pkg: add target to print the tag

$ make --no-print-directory -C pkg/init/ show-tag
linuxkit/init:36c56f0664d49c5a6adc1120d1bf5ba6ac30b389

Useful for scripting etc.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
Ian Campbell 2017-06-27 17:08:59 +01:00
parent bc8180ad89
commit 55f537631a

View File

@ -1,4 +1,4 @@
.PHONY: tag push
.PHONY: image tag show-tag
default: push
ORG?=linuxkit
@ -27,6 +27,9 @@ else
NET_OPT=--network=none
endif
show-tag:
@echo $(ORG)/$(IMAGE):$(TAG)
tag: $(BASE_DEPS) $(DEPS)
DOCKER_CONTENT_TRUST=1 docker pull $(ORG)/$(IMAGE):$(TAG) || \
docker build $(NET_OPT) -t $(ORG)/$(IMAGE):$(TAG) .