mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-24 12:35:58 +00:00
Also removes `mobyplatform` from the cmdline as this is no longer used Signed-off-by: Dave Tucker <dt@docker.com>
28 lines
705 B
Makefile
28 lines
705 B
Makefile
.PHONY: tag push
|
|
|
|
IMAGE=mkimage-gcp
|
|
|
|
default: push
|
|
|
|
hash: Dockerfile make-gcp
|
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
docker run --entrypoint sh --rm $(IMAGE):build -c "(cat $^; apt list --installed 2>/dev/null) | sha1sum" | sed 's/ .*//' > hash
|
|
|
|
push: hash
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
|
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
tag: hash
|
|
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
clean:
|
|
rm -f hash
|
|
|
|
.DELETE_ON_ERROR:
|