add push make targets for images

This commit is contained in:
sid palas
2023-02-03 16:30:27 -05:00
parent cd7d910949
commit 2fe6ec3783
3 changed files with 47 additions and 5 deletions

View File

@ -1,12 +1,26 @@
API_GOLANG_PATH:=../../05-example-web-application/api-golang/
DOCKERHUB_REPO:=sidpalas/devops-directive-docker-course-api-golang
N?=0
.PHONY: build-N
build-N:
docker build --file ./Dockerfile.$(N) -t api-golang:$(N) ${API_GOLANG_PATH}
docker build --file ./Dockerfile.${N} \
-t api-golang:${N} \
-t ${DOCKERHUB_REPO}:${N} \
${API_GOLANG_PATH}
.PHONY: build-all
build-all:
for number in 0 1 2 3 4 5 6 ; do \
N=$$number $(MAKE) build-N; \
done
done
.PHONY: push-N
push-N:
docker push ${DOCKERHUB_REPO}:${N}
.PHONY: push-all
push-all:
for number in 0 1 2 3 4 5 6 ; do \
N=$$number $(MAKE) push-N; \
done

View File

@ -1,12 +1,26 @@
API_NODE_PATH:=../../05-example-web-application/api-node/
DOCKERHUB_REPO:=sidpalas/devops-directive-docker-course-api-node
N?=0
.PHONY: build-N
build-N:
docker build --file ./Dockerfile.$(N) -t api-node:$(N) ${API_NODE_PATH}
docker build --file ./Dockerfile.${N} \
-t api-node:${N} \
-t ${DOCKERHUB_REPO}:${N} \
${API_NODE_PATH}
.PHONY: build-all
build-all:
for number in 0 1 2 3 4 5 6 7 ; do \
N=$$number $(MAKE) build-N; \
done
.PHONY: push-N
push-N:
docker push ${DOCKERHUB_REPO}:${N}
.PHONY: push-all
push-all:
for number in 0 1 2 3 4 5 6 7; do \
N=$$number $(MAKE) push-N; \
done

View File

@ -1,12 +1,26 @@
API_NODE_PATH:=../../05-example-web-application/client-react/
DOCKERHUB_REPO:=sidpalas/devops-directive-docker-course-client-react-nginx
N?=0
.PHONY: build-N
build-N:
docker build --file ./Dockerfile.$(N) -t client-react:$(N) ${API_NODE_PATH}
docker build --file ./Dockerfile.${N} \
-t client-react:${N} \
-t ${DOCKERHUB_REPO}:${N} \
${API_NODE_PATH}
.PHONY: build-all
build-all:
for number in 0 1 2 3 4 5; do \
N=$$number $(MAKE) build-N; \
done
done
.PHONY: push-N
push-N:
docker push ${DOCKERHUB_REPO}:${N}
.PHONY: push-all
push-all:
for number in 0 1 2 3 4 5; do \
N=$$number $(MAKE) push-N; \
done