From b827fdd5a5f5ca7aa2d1dc1195d9efb4fcc6f405 Mon Sep 17 00:00:00 2001 From: wy65701436 Date: Tue, 4 Apr 2017 23:48:29 -0700 Subject: [PATCH] use gzip to save docker images. --- Makefile | 12 ++++++------ make/install.sh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3593831c5a..db0a7a6a9d 100644 --- a/Makefile +++ b/Makefile @@ -311,22 +311,22 @@ package_offline: compile build modify_composefile @echo "saving harbor docker image" @if [ "$(NOTARYFLAG)" = "true" ] ; then \ - $(DOCKERSAVE) -o $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tgz \ - $(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ + $(DOCKERSAVE) $(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ $(DOCKERIMAGENAME_UI):$(VERSIONTAG) \ $(DOCKERIMAGENAME_LOG):$(VERSIONTAG) \ $(DOCKERIMAGENAME_DB):$(VERSIONTAG) \ $(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG) \ nginx:$(NGINXVERSION) vmware/registry:$(REGISTRYVERSION) photon:$(PHOTONVERSION) \ - vmware/notary-photon:$(NOTARYVERSION) vmware/notary-photon:$(NOTARYSIGNERVERSION) vmware/harbor-notary-db:$(MARIADBVERSION); \ + vmware/notary-photon:$(NOTARYVERSION) vmware/notary-photon:$(NOTARYSIGNERVERSION) \ + vmware/harbor-notary-db:$(MARIADBVERSION) | gzip > $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar.gz; \ else \ - $(DOCKERSAVE) -o $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tgz \ - $(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ + $(DOCKERSAVE) $(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ $(DOCKERIMAGENAME_UI):$(VERSIONTAG) \ $(DOCKERIMAGENAME_LOG):$(VERSIONTAG) \ $(DOCKERIMAGENAME_DB):$(VERSIONTAG) \ $(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG) \ - nginx:$(NGINXVERSION) vmware/registry:$(REGISTRYVERSION) photon:$(PHOTONVERSION) ; \ + nginx:$(NGINXVERSION) vmware/registry:$(REGISTRYVERSION) \ + photon:$(PHOTONVERSION) | gzip > $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar.gz; \ fi @if [ "$(NOTARYFLAG)" = "true" ] ; then \ diff --git a/make/install.sh b/make/install.sh index def0189f00..d1e1bd9946 100755 --- a/make/install.sh +++ b/make/install.sh @@ -140,10 +140,10 @@ h2 "[Step $item]: checking installation environment ..."; let item+=1 check_docker check_dockercompose -if [ -f harbor*.tgz ] +if [ -f harbor*.tar.gz ] then h2 "[Step $item]: loading Harbor images ..."; let item+=1 - docker load -i ./harbor*.tgz + docker load -i ./harbor*.tar.gz fi echo ""