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 <eli.uriegas@docker.com> (cherry picked from commit 696cdc009ca73b070d8877ee5cdd13c4b0e4a39b) Signed-off-by: Eli Uriegas <eli.uriegas@docker.com> Upstream-commit: ea811c67ee1e558ecec1b394fc591458b57f7ed1 Component: packaging
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user