update
This commit is contained in:
@@ -47,9 +47,9 @@ function Init {
|
||||
|
||||
function StartProc {
|
||||
Print Starting pgsql ...
|
||||
local sock="/tmp/.s.PGSQL.$(su - postgres -c 'postmaster -C port')"
|
||||
local sock="/tmp/.s.PGSQL.$(su - postgres -c 'postgres -C port')"
|
||||
rm -f $sock
|
||||
su - postgres -c postmaster &
|
||||
su - postgres -c postgres &
|
||||
PIDS="$PIDS $!"
|
||||
while sleep 1; do
|
||||
[ -e $sock ] && break || echo -n .
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3.7"
|
||||
|
||||
services:
|
||||
pgsql:
|
||||
image: harbor.colben.cn/general/pgsql:15
|
||||
image: harbor.boyachain.cn:20443/general/pgsql:15
|
||||
container_name: pgsql
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 32s
|
||||
|
||||
@@ -2,7 +2,7 @@ version: "3.7"
|
||||
|
||||
services:
|
||||
pgsql1:
|
||||
image: harbor.colben.cn/general/pgsql:15
|
||||
image: harbor.boyachain.cn:20443/general/pgsql:15
|
||||
container_name: pgsql1
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 32s
|
||||
@@ -20,7 +20,7 @@ services:
|
||||
target: /var/log/pgsql
|
||||
|
||||
pgsql2:
|
||||
image: harbor.colben.cn/general/pgsql:15
|
||||
image: harbor.boyachain.cn:20443/general/pgsql:15
|
||||
container_name: pgsql2
|
||||
restart: "on-failure"
|
||||
stop_grace_period: 32s
|
||||
|
||||
@@ -20,11 +20,11 @@ gpgcheck=0\n\
|
||||
gpgkey=file:///etc/pki/rpm-gpg/PGDG-RPM-GPG-KEY-RHEL\n\
|
||||
repo_gpgcheck = 0\n\
|
||||
" > /etc/yum.repos.d/pgsql-$VERSION.repo \
|
||||
&& dnf makecache \
|
||||
&& dnf -y module disable postgresql \
|
||||
&& dnf install -y postgresql$VERSION-server \
|
||||
&& microdnf makecache \
|
||||
&& microdnf module disable postgresql \
|
||||
&& microdnf install postgresql$VERSION-server \
|
||||
&& rm -rf /var/lib/pgsql/* \
|
||||
/var/cache/dnf \
|
||||
/var/cache/yum \
|
||||
/var/lib/dnf \
|
||||
/var/log/* \
|
||||
&& rm -f /var/lib/pgsql/.bash* \
|
||||
|
||||
@@ -9,8 +9,8 @@ export LANG=en_US.UTF-8
|
||||
|
||||
[ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)"
|
||||
ROOT_DIR="$(cd $(dirname $0) && pwd)"
|
||||
VERSION=${1:?}
|
||||
IMAGE="harbor.colben.cn/general/pgsql$ARCH:$VERSION"
|
||||
TAG=${1:?}
|
||||
IMAGE="harbor.colben.cn/general/pgsql$ARCH:$TAG"
|
||||
|
||||
if [ -t 0 ]; then
|
||||
function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; }
|
||||
@@ -52,7 +52,7 @@ function Build {
|
||||
&& Warn Removing image $IMAGE ... \
|
||||
&& docker rmi $IMAGE
|
||||
Warn Building image: $IMAGE ...
|
||||
docker build --force-rm --build-arg ARCH="$ARCH" --build-arg VERSION="$VERSION" -t $IMAGE -f Dockerfile .
|
||||
docker build --force-rm --build-arg ARCH="$ARCH" --build-arg VERSION="$TAG" -t $IMAGE .
|
||||
YesOrNo Push image: $IMAGE? && docker push $IMAGE
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user