mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 12:30:48 +00:00
29 lines
523 B
Makefile
29 lines
523 B
Makefile
|
PROJECT ?= abevoelker/example_rails_docker_ci
|
||
|
TAG ?= latest
|
||
|
|
||
|
ifdef REGISTRY
|
||
|
IMAGE=$(REGISTRY)/$(PROJECT):$(TAG)
|
||
|
else
|
||
|
IMAGE=$(PROJECT):$(TAG)
|
||
|
endif
|
||
|
|
||
|
all:
|
||
|
@echo "Available targets:"
|
||
|
@echo " * build - build a Docker image for $(IMAGE)"
|
||
|
@echo " * pull - pull $(IMAGE)"
|
||
|
@echo " * push - push $(IMAGE)"
|
||
|
@echo " * test - build and test $(IMAGE)"
|
||
|
|
||
|
build: Dockerfile
|
||
|
docker build -t $(IMAGE) .
|
||
|
|
||
|
pull:
|
||
|
docker pull $(IMAGE) || true
|
||
|
|
||
|
push:
|
||
|
docker push $(IMAGE)
|
||
|
|
||
|
test: build
|
||
|
fig run web ./env/test.sh ./test.sh
|
||
|
|