-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (29 loc) · 852 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
%: all
DOCKER_REPO=
DOCKER_TAG ?= $(shell git describe --always --dirty)
.PHONY: all
all:
make -C ./certs all
make -C ./nginx all
.PHONY: nginx
nginx: all
docker run -p 80:80 -p 443:443 -v `pwd`/nginx/nginx.conf:/etc/nginx/nginx.conf -v `pwd`/certs:/home/ca --rm nginx:latest
.PHONY: docker-build
docker-build: docker-vars all
@echo "Building Docker image: $(DOCKER_REPO):$(DOCKER_TAG)"
docker build -f Dockerfile -t $(DOCKER_REPO):$(DOCKER_TAG) .
.PHONY: docker-push
docker-push: docker-build
@echo "Pushing Docker image: $(DOCKER_REPO):$(DOCKER_TAG)"
docker push $(DOCKER_REPO):$(DOCKER_TAG)
.PHONY: docker-run
docker-run: docker-vars
docker run -it --rm \
--name aia-milkyway \
--network host \
$(DOCKER_REPO):$(DOCKER_TAG)
docker-vars:
test -n "$(DOCKER_REPO)" # $$DOCKER_REPO
.PHONY: clean
clean:
make -C ./certs clean