mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-25 04:15:16 +00:00
- VHD is uncompressed VHD. Currently hard coded at 1GB, which may need to change. Use `format: vhd` - GCE is the GCE compressed tarred raw image. Use `format: gce-img` - reserving `gce` for actually uploading the image. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
28 lines
705 B
Makefile
28 lines
705 B
Makefile
.PHONY: tag push
|
|
|
|
IMAGE=mkimage-vhd
|
|
|
|
default: push
|
|
|
|
hash: Dockerfile make-vhd
|
|
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:
|