!3136 修复docker启动失败的问题

Merge pull request !3136 from zhangxubo/master
This commit is contained in:
opengauss-bot
2023-03-14 12:33:34 +00:00
committed by Gitee
10 changed files with 119 additions and 124 deletions

View File

@ -1,6 +1,6 @@
FROM centos:7.6.1810 FROM centos:7.6.1810
COPY openGauss-3.0.0-CentOS-64bit.tar.bz2 . COPY openGauss-5.0.0-CentOS-64bit.tar.bz2 .
COPY gosu-amd64 /usr/local/bin/gosu COPY gosu-amd64 /usr/local/bin/gosu
ENV LANG en_US.utf8 ENV LANG en_US.utf8
@ -15,10 +15,10 @@ RUN set -eux; \
mkdir -p /usr/local/opengauss && \ mkdir -p /usr/local/opengauss && \
mkdir -p /var/run/opengauss && \ mkdir -p /var/run/opengauss && \
mkdir /docker-entrypoint-initdb.d && \ mkdir /docker-entrypoint-initdb.d && \
tar -jxf openGauss-3.0.0-CentOS-64bit.tar.bz2 -C /usr/local/opengauss && \ tar -jxf openGauss-5.0.0-CentOS-64bit.tar.bz2 -C /usr/local/opengauss && \
chown -R omm:omm /var/run/opengauss && chown -R omm:omm /usr/local/opengauss && chown -R omm:omm /var/lib/opengauss && chown -R omm:omm /docker-entrypoint-initdb.d && \ chown -R omm:omm /var/run/opengauss && chown -R omm:omm /usr/local/opengauss && chown -R omm:omm /var/lib/opengauss && chown -R omm:omm /docker-entrypoint-initdb.d && \
chmod 2777 /var/run/opengauss && \ chmod 2777 /var/run/opengauss && \
rm -rf openGauss-3.0.0-CentOS-64bit.tar.bz2 && yum clean all rm -rf openGauss-5.0.0-CentOS-64bit.tar.bz2 && yum clean all
RUN set -eux; \ RUN set -eux; \
echo "export GAUSSHOME=/usr/local/opengauss" >> /home/omm/.bashrc && \ echo "export GAUSSHOME=/usr/local/opengauss" >> /home/omm/.bashrc && \

View File

@ -1,6 +1,6 @@
FROM openeuler-20.03-lts:latest FROM openeuler-20.03-lts:latest
COPY openGauss-3.0.0-openEuler-64bit.tar.bz2 . COPY openGauss-5.0.0-openEuler-64bit.tar.bz2 .
COPY gosu-arm64 /usr/local/bin/gosu COPY gosu-arm64 /usr/local/bin/gosu
COPY openEuler_aarch64.repo /etc/yum.repos.d/openEuler_aarch64.repo COPY openEuler_aarch64.repo /etc/yum.repos.d/openEuler_aarch64.repo
ENV LANG en_US.utf8 ENV LANG en_US.utf8
@ -15,10 +15,10 @@ RUN set -eux; \
mkdir -p /usr/local/opengauss && \ mkdir -p /usr/local/opengauss && \
mkdir -p /var/run/opengauss && \ mkdir -p /var/run/opengauss && \
mkdir /docker-entrypoint-initdb.d && \ mkdir /docker-entrypoint-initdb.d && \
tar -jxf openGauss-3.0.0-openEuler-64bit.tar.bz2 -C /usr/local/opengauss && \ tar -jxf openGauss-5.0.0-openEuler-64bit.tar.bz2 -C /usr/local/opengauss && \
chown -R omm:omm /var/run/opengauss && chown -R omm:omm /usr/local/opengauss && chown -R omm:omm /var/lib/opengauss && chown -R omm:omm /docker-entrypoint-initdb.d && \ chown -R omm:omm /var/run/opengauss && chown -R omm:omm /usr/local/opengauss && chown -R omm:omm /var/lib/opengauss && chown -R omm:omm /docker-entrypoint-initdb.d && \
chmod 2777 /var/run/opengauss && \ chmod 2777 /var/run/opengauss && \
rm -rf openGauss-3.0.0-openEuler-64bit.tar.bz2 && yum clean all rm -rf openGauss-5.0.0-openEuler-64bit.tar.bz2 && yum clean all
RUN set -eux; \ RUN set -eux; \
echo "export GAUSSHOME=/usr/local/opengauss" >> /home/omm/.bashrc && \ echo "export GAUSSHOME=/usr/local/opengauss" >> /home/omm/.bashrc && \

View File

@ -308,13 +308,8 @@ docker_temp_server_start() {
shift shift
fi fi
# internal start of server in order to allow setup using gsql client
# does not listen on external TCP/IP and waits until start finishes
set -- "$@" -c "listen_addresses='*'" -p "${PGPORT:-5432}"
PGUSER="${PGUSER:-$GS_USER}" \ PGUSER="${PGUSER:-$GS_USER}" \
gs_ctl -D "$PGDATA" \ gs_ctl -D "$PGDATA" \
-o "$(printf '%q ' "$@")" \
-w start -w start
} }

View File

@ -84,7 +84,7 @@ check_docker_version() {
############## ##############
# Parameters # Parameters
VERSION="1.0.0" VERSION="5.0.0"
SKIPCHECKSUM=0 SKIPCHECKSUM=0
DOCKEROPS="" DOCKEROPS=""
MIN_DOCKER_VERSION="17.09" MIN_DOCKER_VERSION="17.09"

View File

@ -64,8 +64,8 @@ read -p "Please input SLAVE_NODENAME [opengauss_slave1]: " SLAVE_NODENAME
SLAVE_NODENAME=${SLAVE_NODENAME:-opengauss_slave1} SLAVE_NODENAME=${SLAVE_NODENAME:-opengauss_slave1}
echo "SLAVE_NODENAME set $SLAVE_NODENAME" echo "SLAVE_NODENAME set $SLAVE_NODENAME"
read -p "Please input openGauss VERSION [1.0.1]: " VERSION read -p "Please input openGauss VERSION [5.0.0]: " VERSION
VERSION=${VERSION:-1.0.1} VERSION=${VERSION:-5.0.0}
echo "openGauss VERSION set $VERSION" echo "openGauss VERSION set $VERSION"
echo "starting " echo "starting "