Skip to content

Commit 94a7d22

Browse files
committed
make: require docker image tag
1 parent 25fb813 commit 94a7d22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docker.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
DOCKERFILE ?= ./build/Dockerfile
22
IMG_NAME ?= x1unix/go-playground
3-
TAG ?= 1.0.0
43

54
.PHONY: docker
65
docker: docker-login docker-make-image
@@ -20,5 +19,8 @@ docker-login:
2019

2120
.PHONY: docker-make-image
2221
docker-make-image:
22+
@if [ -z "$(TAG)" ]; then\
23+
echo "required parameter TAG is undefined" && exit 1; \
24+
fi;
2325
@echo "- Building '$(IMG_NAME):latest' $(TAG)..."
2426
docker image build -t $(IMG_NAME):latest -t $(IMG_NAME):$(TAG) -f $(DOCKERFILE) .

0 commit comments

Comments
 (0)