From 9f7917e54312157f5832fabcbdd7b412126bf34f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 26 Jul 2017 13:56:43 +0100 Subject: [PATCH] tools: Update consumers of linuxkit/guestfs to package.mk build Also update the base image to the latest. Signed-off-by: Ian Campbell --- tools/mkimage-dynamic-vhd/Dockerfile | 2 +- tools/mkimage-dynamic-vhd/Makefile | 27 ++------------------------- tools/mkimage-gcp/Dockerfile | 2 +- tools/mkimage-gcp/Makefile | 27 ++------------------------- tools/mkimage-vhd/Dockerfile | 2 +- tools/mkimage-vhd/Makefile | 27 ++------------------------- tools/mkimage-vmdk/Dockerfile | 2 +- tools/mkimage-vmdk/Makefile | 27 ++------------------------- 8 files changed, 12 insertions(+), 104 deletions(-) diff --git a/tools/mkimage-dynamic-vhd/Dockerfile b/tools/mkimage-dynamic-vhd/Dockerfile index ad23bc3ba..3d74bfa62 100644 --- a/tools/mkimage-dynamic-vhd/Dockerfile +++ b/tools/mkimage-dynamic-vhd/Dockerfile @@ -1,4 +1,4 @@ -FROM linuxkit/guestfs:2657580764d5791e103647237dac5a0276533e2e@sha256:8f99eba6720df17bce8893052d7ca9a07cdc9cd09b335a5a9c57ebd5a44934be +FROM linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f COPY . . diff --git a/tools/mkimage-dynamic-vhd/Makefile b/tools/mkimage-dynamic-vhd/Makefile index c9a7f25c9..a3646f26c 100644 --- a/tools/mkimage-dynamic-vhd/Makefile +++ b/tools/mkimage-dynamic-vhd/Makefile @@ -1,27 +1,4 @@ -.PHONY: tag push - IMAGE=mkimage-dynamic-vhd +DEPS=make-dynamic-vhd -default: push - -hash: Dockerfile make-dynamic-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 linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) - docker rmi $(IMAGE):build - rm -f hash - -tag: hash - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) - docker rmi $(IMAGE):build - rm -f hash - -clean: - rm -f hash - -.DELETE_ON_ERROR: +include ../../pkg/package.mk diff --git a/tools/mkimage-gcp/Dockerfile b/tools/mkimage-gcp/Dockerfile index 6a241f530..f7470dc8a 100644 --- a/tools/mkimage-gcp/Dockerfile +++ b/tools/mkimage-gcp/Dockerfile @@ -1,4 +1,4 @@ -FROM linuxkit/guestfs:2657580764d5791e103647237dac5a0276533e2e@sha256:8f99eba6720df17bce8893052d7ca9a07cdc9cd09b335a5a9c57ebd5a44934be +FROM linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f COPY . . diff --git a/tools/mkimage-gcp/Makefile b/tools/mkimage-gcp/Makefile index 868ea39fe..dfc5a3c7e 100644 --- a/tools/mkimage-gcp/Makefile +++ b/tools/mkimage-gcp/Makefile @@ -1,27 +1,4 @@ -.PHONY: tag push - IMAGE=mkimage-gcp +DEPS=make-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 linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) - docker rmi $(IMAGE):build - rm -f hash - -tag: hash - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) - docker rmi $(IMAGE):build - rm -f hash - -clean: - rm -f hash - -.DELETE_ON_ERROR: +include ../../pkg/package.mk diff --git a/tools/mkimage-vhd/Dockerfile b/tools/mkimage-vhd/Dockerfile index 09e114eba..bf8312950 100644 --- a/tools/mkimage-vhd/Dockerfile +++ b/tools/mkimage-vhd/Dockerfile @@ -1,4 +1,4 @@ -FROM linuxkit/guestfs:2657580764d5791e103647237dac5a0276533e2e@sha256:8f99eba6720df17bce8893052d7ca9a07cdc9cd09b335a5a9c57ebd5a44934be +FROM linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f COPY . . diff --git a/tools/mkimage-vhd/Makefile b/tools/mkimage-vhd/Makefile index d5b7c14cd..9b390de57 100644 --- a/tools/mkimage-vhd/Makefile +++ b/tools/mkimage-vhd/Makefile @@ -1,27 +1,4 @@ -.PHONY: tag push - IMAGE=mkimage-vhd +DEPS=make-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 linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) - docker rmi $(IMAGE):build - rm -f hash - -tag: hash - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) - docker rmi $(IMAGE):build - rm -f hash - -clean: - rm -f hash - -.DELETE_ON_ERROR: +include ../../pkg/package.mk diff --git a/tools/mkimage-vmdk/Dockerfile b/tools/mkimage-vmdk/Dockerfile index c132fb975..5d32e483c 100644 --- a/tools/mkimage-vmdk/Dockerfile +++ b/tools/mkimage-vmdk/Dockerfile @@ -1,4 +1,4 @@ -FROM linuxkit/guestfs:2657580764d5791e103647237dac5a0276533e2e@sha256:8f99eba6720df17bce8893052d7ca9a07cdc9cd09b335a5a9c57ebd5a44934be +FROM linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f COPY . . diff --git a/tools/mkimage-vmdk/Makefile b/tools/mkimage-vmdk/Makefile index 70a369f5d..f2c2d71a0 100644 --- a/tools/mkimage-vmdk/Makefile +++ b/tools/mkimage-vmdk/Makefile @@ -1,27 +1,4 @@ -.PHONY: tag push - IMAGE=mkimage-vmdk +DEPS=make-vmdk -default: push - -hash: Dockerfile make-vmdk - 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 linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) - docker rmi $(IMAGE):build - rm -f hash - -tag: hash - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) - docker rmi $(IMAGE):build - rm -f hash - -clean: - rm -f hash - -.DELETE_ON_ERROR: +include ../../pkg/package.mk