From 054a26434cd1099b64b9fe3ac87432fdc0736b3c Mon Sep 17 00:00:00 2001 From: zzh Date: Tue, 3 Sep 2024 14:32:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildDockerImage.sh | 2 +- dockerfiles/dockerfile_amd | 6 +++--- dockerfiles/dockerfile_arm | 6 +++--- dockerfiles/entrypoint.sh | 11 ++++++----- dockerfiles/gs_createtrust.py | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/buildDockerImage.sh b/buildDockerImage.sh index bede373..4fbdf32 100755 --- a/buildDockerImage.sh +++ b/buildDockerImage.sh @@ -132,7 +132,7 @@ check_docker_version IMAGE_NAME="opengauss:$VERSION" # check package exist -if [ "`ls dockerfiles/ |grep openGauss-${VERSION}`" == "" ]; then +if [ "`ls dockerfiles/ |grep openGauss-All-${VERSION}`" == "" ]; then echo "Could not find openGauss $VERSION package."; exit 1; fi diff --git a/dockerfiles/dockerfile_amd b/dockerfiles/dockerfile_amd index 76b75ee..310d7e1 100644 --- a/dockerfiles/dockerfile_amd +++ b/dockerfiles/dockerfile_amd @@ -1,8 +1,8 @@ FROM centos:7.6.1810 -ENV OPENGAUSS_VERSION 5.1.0 +ENV OPENGAUSS_VERSION 6.0.0 -COPY openGauss-${OPENGAUSS_VERSION}-CentOS-64bit-all.tar.gz . +COPY openGauss-All-${OPENGAUSS_VERSION}-CentOS7-x86_64.tar.gz . COPY gosu-amd64 /usr/local/bin/gosu COPY gs_createtrust.py . ENV LANG en_US.utf8 @@ -15,7 +15,7 @@ RUN set -eux; \ mkdir -p /opengauss && \ chmod 700 /opengauss && \ - mv openGauss-${OPENGAUSS_VERSION}-CentOS-64bit-all.tar.gz /opengauss && \ + mv openGauss-All-${OPENGAUSS_VERSION}-CentOS7-x86_64.tar.gz /opengauss && \ mv gs_createtrust.py /opengauss && \ mkdir -p /volume && \ chmod -R 755 /volume && \ diff --git a/dockerfiles/dockerfile_arm b/dockerfiles/dockerfile_arm index 0c16d5e..bb88290 100644 --- a/dockerfiles/dockerfile_arm +++ b/dockerfiles/dockerfile_arm @@ -1,8 +1,8 @@ FROM openeuler-20.03-lts:latest -ENV OPENGAUSS_VERSION 5.1.0 +ENV OPENGAUSS_VERSION 6.0.0 -COPY openGauss-${OPENGAUSS_VERSION}-openEuler-64bit-all.tar.gz . +COPY openGauss-All-${OPENGAUSS_VERSION}-CentOS7-x86_64.tar.gz . COPY gosu-arm64 /usr/local/bin/gosu COPY gs_createtrust.py . ENV LANG en_US.utf8 @@ -16,7 +16,7 @@ RUN set -eux; \ mkdir -p /opengauss && \ chmod 700 /opengauss && \ - mv openGauss-${OPENGAUSS_VERSION}-openEuler-64bit-all.tar.gz /opengauss && \ + mv openGauss-All-${OPENGAUSS_VERSION}-CentOS7-x86_64.tar.gz /opengauss && \ mv gs_createtrust.py /opengauss && \ mkdir -p /volume && \ chmod -R 755 /volume && \ diff --git a/dockerfiles/entrypoint.sh b/dockerfiles/entrypoint.sh index 47c8a27..1132a4b 100755 --- a/dockerfiles/entrypoint.sh +++ b/dockerfiles/entrypoint.sh @@ -69,12 +69,12 @@ function set_envfile() { function install_application() { cd ${package_path} - enterprise_pkg_file=$(ls ${ROOT_DIR}/openGauss-*-all.tar.gz) + enterprise_pkg_file=$(ls ${ROOT_DIR}/openGauss-All-*.tar.gz) tar -xf ${enterprise_pkg_file} -C . - plat_info=$(ls openGauss*.tar.bz2 | sed 's/openGauss-\(.*\)-64bit.tar.bz2/\1/g') - tar -xf openGauss-${plat_info}-64bit.tar.bz2 -C ${app_path} - tar -xf openGauss-${plat_info}-64bit-cm.tar.gz -C ${app_path} - tar -xf openGauss-${plat_info}-64bit-om.tar.gz -C ${tool_path} + plat_info=$(ls openGauss*.tar.bz2 | sed 's/openGauss-Server-\(.*\).tar.bz2/\1/g') + tar -xf openGauss-Server-${plat_info}.tar.bz2 -C ${app_path} + tar -xf openGauss-CM-${plat_info}.tar.gz -C ${app_path} + tar -xf openGauss-OM-${plat_info}.tar.gz -C ${tool_path} # 拷贝python3依赖的lib python_version=$(python3 -V | awk '{print $2}' | awk -F'.' '{print $2}') cd ${tool_path}/lib/ || exit @@ -207,6 +207,7 @@ function clean_environment() { } function main() { + chmod 777 /tmp docker_setup_env if [ -n "$DATABASE_ALREADY_EXISTS" ]; then if [ "$(id -u)" = '0' ]; then diff --git a/dockerfiles/gs_createtrust.py b/dockerfiles/gs_createtrust.py index f642b5c..9bad760 100644 --- a/dockerfiles/gs_createtrust.py +++ b/dockerfiles/gs_createtrust.py @@ -1110,7 +1110,7 @@ General options: output: NA """ if (hostname == self.localHost or - hostname in DefaultValue.get_local_ips()): + hostname in DefaultValue.get_local_ips(NetUtil.get_ip_version(hostname))): return bashrc_file = os.path.join(pwd.getpwuid(os.getuid()).pw_dir, ".bashrc") @@ -1243,7 +1243,7 @@ General options: shell_file = os.path.join(localDirPath, "./local/ssh-agent.sh") for ip in ips: if (ip == self.localHost or - ip in DefaultValue.get_local_ips()): + ip in DefaultValue.get_local_ips(NetUtil.get_ip_version(ip))): continue session = self.get_ssh_session(ip) DefaultValue.register_remote_ssh_agent(session, ip, self.logger) -- Gitee