diff --git a/components/packaging/deb/Makefile b/components/packaging/deb/Makefile index fd4b049598..9e0c2d4e10 100644 --- a/components/packaging/deb/Makefile +++ b/components/packaging/deb/Makefile @@ -157,6 +157,6 @@ sources/dockerd.json: ../common/dockerd.json $< > $@ # offline bundle -sources/engine.tar: $(DOCKER2OCI) - $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH) - tar c -C ../engine-$(ARCH) . > $@ +sources/engine.tar: + $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH).tar + mv ../image/engine-$(ARCH).tar $@ diff --git a/components/packaging/image/Makefile b/components/packaging/image/Makefile index 71ffa63864..2f5b2f825b 100644 --- a/components/packaging/image/Makefile +++ b/components/packaging/image/Makefile @@ -46,7 +46,7 @@ image-linux: $(ENGINE_DIR)/Dockerfile.engine DOCKER2OCI=artifacts/docker2oci $(DOCKER2OCI): -$(CHOWN) -R $(shell id -u):$(shell id -g) $(@D) - docker run --name docker2oci $(GO_IMAGE) sh -c 'go get github.com/coolljt0725/docker2oci' + docker run --name docker2oci $(ENGINE_GO_IMAGE) sh -c 'go get github.com/coolljt0725/docker2oci' mkdir -p $(@D) docker cp docker2oci:/go/bin/docker2oci "$@" docker rm -f docker2oci diff --git a/components/packaging/rpm/Makefile b/components/packaging/rpm/Makefile index bcd07fa53f..e9b44ec8b3 100644 --- a/components/packaging/rpm/Makefile +++ b/components/packaging/rpm/Makefile @@ -124,6 +124,6 @@ rpmbuild/SOURCES/dockerd.json: ../common/dockerd.json $< > $@ # offline bundle -rpmbuild/SOURCES/engine.tar: $(DOCKER2OCI) - $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH) - tar c -C ../image/engine-$(ARCH) . > $@ +rpmbuild/SOURCES/engine.tar: + $(MAKE) -C ../image ENGINE_IMAGE=$(ENGINE_IMAGE) ENGINE_SCOPE=$(ENGINE_SCOPE) engine-$(ARCH).tar + mv ../image/engine-$(ARCH).tar $@