mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-11-01 01:24:13 +00:00
Also use the git tree hash as the hash. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
16 lines
357 B
Makefile
16 lines
357 B
Makefile
.PHONY: tag push
|
|
default: push
|
|
|
|
ORG?=linuxkit
|
|
IMAGE=qemu
|
|
DEPS=Dockerfile Makefile
|
|
|
|
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
|
|
|
tag: $(DEPS)
|
|
DOCKER_CONTENT_TRUST=1 docker build --no-cache --network=none -t $(ORG)/$(IMAGE):$(HASH) .
|
|
|
|
push: tag
|
|
docker pull $(ORG)/$(IMAGE):$(HASH) || \
|
|
docker push $(ORG)/$(IMAGE):$(HASH)
|