From f36755c235e6444d6b29e8d8e66f47a6e6b5dbce Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Tue, 11 Sep 2018 19:13:45 -0700 Subject: [PATCH 1/3] Wire up the platform string properly This is set in a top-level makefile, but apparently isn't getting passed all the way through as expected. Signed-off-by: Daniel Hiltgen Upstream-commit: a5ad5471419cb2a0935148f891c5ada8b13b4779 Component: packaging --- components/packaging/image/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/components/packaging/image/Makefile b/components/packaging/image/Makefile index 2f5b2f825b..7af4fd25d1 100644 --- a/components/packaging/image/Makefile +++ b/components/packaging/image/Makefile @@ -11,6 +11,7 @@ ARCH=$(shell uname -m) ENGINE_IMAGE?=engine-community CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown DEFAULT_PRODUCT_LICENSE?=Community Engine +PLATFORM?=Docker Engine - Community .PHONY: help help: ## show make targets From 7589c6479b71ba6dbe9b647394a102dc499b5cba Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 12 Sep 2018 05:34:06 -0700 Subject: [PATCH 2/3] Have the tar target make a docker compat one too docker load doesn't support OCI based tar files so we have to make 2 different ones. Signed-off-by: Eli Uriegas (cherry picked from commit 696cdc009ca73b070d8877ee5cdd13c4b0e4a39b) Signed-off-by: Eli Uriegas Upstream-commit: ea811c67ee1e558ecec1b394fc591458b57f7ed1 Component: packaging --- components/packaging/image/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/packaging/image/Makefile b/components/packaging/image/Makefile index 2f5b2f825b..017a2dd614 100644 --- a/components/packaging/image/Makefile +++ b/components/packaging/image/Makefile @@ -21,6 +21,8 @@ clean: ## remove build artifacts -$(RM) $(ENGINE_DIR)/Dockerfile.engine -docker rmi $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION) -rm -f image-linux + -$(RM) -r artifacts + -$(RM) *.tar .PHONY: image image: image-linux @@ -52,13 +54,15 @@ $(DOCKER2OCI): docker rm -f docker2oci $(CHOWN) -R $(shell id -u):$(shell id -g) $(@D) -engine-$(ARCH).tar: image-linux $(DOCKER2OCI) +engine-$(ARCH).tar: engine-$(ARCH)-docker-compat.tar $(DOCKER2OCI) mkdir -p artifacts - docker save -o artifacts/docker-engine.tar $$(cat image-linux) - ./$(DOCKER2OCI) -i artifacts/docker-engine.tar artifacts/engine-image + ./$(DOCKER2OCI) -i $< artifacts/engine-image mkdir -p $(@D) tar c -C artifacts/engine-image . > $@ +engine-$(ARCH)-docker-compat.tar: image-linux + docker save -o $@ $$(cat $<) + .PHONY: release release: docker push $(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION).$(ARCH) From b18755d5093e7a8cb2bbd5c0a1c066f9ba84e106 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Wed, 12 Sep 2018 05:34:54 -0700 Subject: [PATCH 3/3] Add *.tar and image-linux to our gitignore A bit overdue Signed-off-by: Eli Uriegas (cherry picked from commit 11643a30e0bdde4016afe42ab5f1f85e0fc83ecf) Signed-off-by: Eli Uriegas Upstream-commit: f38206fa477c59ec39b06b8ddde40be1f65c7cf0 Component: packaging --- components/packaging/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/packaging/.gitignore b/components/packaging/.gitignore index 000ba3f5a5..fdc9063e47 100644 --- a/components/packaging/.gitignore +++ b/components/packaging/.gitignore @@ -4,3 +4,5 @@ rpmbuild tmp artifacts sources +*.tar +image-linux