From 27670742b4d50fa34787ede2edb100fda7573410 Mon Sep 17 00:00:00 2001 From: yixingj Date: Mon, 26 Jun 2017 15:31:34 +0800 Subject: [PATCH] Change version fromat and add init db sql directory --- Makefile | 10 +++++----- make/common/postgresql/Dockerfile | 1 + make/docker-compose.clair.yml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 121856168..dc5aec88b 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ NEWCLARITYVERSION= #clair parameters CLAIRVERSION=v2.0.0 CLAIRFLAG=false -CLAIRDBVERSION=9.6.3 +CLAIRDBVERSION=9.6.3-photon #clarity parameters CLARITYIMAGE=vmware/harbor-clarity-ui-builder[:tag] @@ -178,7 +178,7 @@ DOCKERIMAGENAME_JOBSERVICE=vmware/harbor-jobservice DOCKERIMAGENAME_LOG=vmware/harbor-log DOCKERIMAGENAME_DB=vmware/harbor-db DOCKERIMAGENAME_CLATIRY=vmware/harbor-clarity-ui-builder -DOCKERIMAGENAME_POSTGRESQL=vmware/harbor-postgresql +DOCKERIMAGENAME_POSTGRESQL=vmware/postgresql # docker-compose files DOCKERCOMPOSEFILEPATH=$(MAKEPATH) DOCKERCOMPOSETPLFILENAME=docker-compose.tpl @@ -242,7 +242,7 @@ ifeq ($(NOTARYFLAG), true) DOCKERCOMPOSE_LIST+= -f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSENOTARYFILENAME) endif ifeq ($(CLAIRFLAG), true) - DOCKERSAVE_PARA+= quay.io/coreos/clair:$(CLAIRVERSION) vmware/harbor-postgresql:$(CLAIRDBVERSION) + DOCKERSAVE_PARA+= quay.io/coreos/clair:$(CLAIRVERSION) vmware/postgresql:$(CLAIRDBVERSION) PACKAGE_OFFLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSECLAIRFILENAME) PACKAGE_ONLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSECLAIRFILENAME) DOCKERCOMPOSE_LIST+= -f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSECLAIRFILENAME) @@ -312,7 +312,7 @@ build_photon: build_common make -f $(MAKEFILEPATH_PHOTON)/Makefile build -e DEVFLAG=$(DEVFLAG) build_postgresql: @echo "buildging postgresql container for photon..." - @cd $(DOCKERFILEPATH_POSTGRESQL) && $(DOCKERBUILD) -f $(DOCKERFILENAME_POSTGRESQL) -t $(DOCKERIMAGENAME_POSTGRESQL):$(VERSIONTAG) . + @cd $(DOCKERFILEPATH_POSTGRESQL) && $(DOCKERBUILD) -f $(DOCKERFILENAME_POSTGRESQL) -t $(DOCKERIMAGENAME_POSTGRESQL):$(CLAIRDBVERSION) . @echo "Done." build: build_$(BASEIMAGE) @@ -368,7 +368,7 @@ package_offline: compile build modify_sourcefiles modify_composefile @if [ "$(CLAIRFLAG)" = "true" ] ; then \ echo "pulling claiy and postgres..."; \ $(DOCKERPULL) quay.io/coreos/clair:$(CLAIRVERSION); \ - $(DOCKERPULL) vmware/harbor-postgresql:$(CLAIRDBVERSION); \ + $(DOCKERPULL) vmware/postgresql:$(CLAIRDBVERSION); \ fi @echo "saving harbor docker image" diff --git a/make/common/postgresql/Dockerfile b/make/common/postgresql/Dockerfile index f4c89ae09..ca9bc9689 100644 --- a/make/common/postgresql/Dockerfile +++ b/make/common/postgresql/Dockerfile @@ -6,6 +6,7 @@ RUN touch /etc/localtime.bak \ && tdnf install -y sed shadow gzip postgresql\ && groupadd -r postgres --gid=999 \ && useradd -r -g postgres --uid=999 postgres \ + && mkdir -p /docker-entrypoint-initdb.d \ && mkdir -p /run/postgresql \ && chown -R postgres:postgres /run/postgresql \ && chmod 2777 /run/postgresql \ diff --git a/make/docker-compose.clair.yml b/make/docker-compose.clair.yml index 9529458bb..e5eb31867 100644 --- a/make/docker-compose.clair.yml +++ b/make/docker-compose.clair.yml @@ -17,7 +17,7 @@ services: aliases: - postgres container_name: clair-db - image: vmware/harbor-postgresql:9.6.3 + image: vmware/postgresql:9.6.3-photon restart: always depends_on: - log