Files
linuxkit/tools/guestfs/Makefile
Ian Campbell ac3103236e toos/guestfs: Enable content trust globally
This makes the need to pull $(BASE) redundant.

Rebuild resulted in linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-07-26 14:47:42 +01:00

30 lines
672 B
Makefile

.PHONY: tag push
IMAGE=guestfs
export DOCKER_CONTENT_TRUST=1
default: push
iid: Dockerfile
tar cf - $^ | docker build --no-cache --iidfile iid -
hash: Makefile iid
docker run --rm $(shell cat iid) sh -c 'apt list --installed 2>/dev/null | sha1sum' | sed 's/ .*//' > hash
push: hash iid
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(shell cat iid) linuxkit/$(IMAGE):$(shell cat hash) && \
docker push linuxkit/$(IMAGE):$(shell cat hash))
rm -f iid
tag: hash iid
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(shell cat iid) linuxkit/$(IMAGE):$(shell cat hash)
rm -f iid
clean:
rm -f hash iid
.DELETE_ON_ERROR: