下载二进制包到/opt/software/
wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/1.1.0/x86/openGauss-1.1.0-CentOS-64bit-all.tar.gz
下载源码软件到/opt/software/
地址:https://gitee.com/opengauss/openGauss-server/tree/master/docker/dockerfiles
解压二进制包
tar -xf openGauss-1.1.0-CentOS-64bit-all.tar.gz
ll /opt/software/
unzip openGauss-server-master.zip # 源码包解压文件
mv openGauss-1.1.0-CentOS-64bit.tar.bz2 openGauss-server-master/docker/dockerfiles/1.1.0/
启动docker
systemctl start docker
修改md5校验文件内容
cd /opt/software/openGauss-server-master/docker/dockerfiles/1.1.0/
echo "9d713a83d613c4de248882b7df5472e7 openGauss-1.1.0-CentOS-64bit.tar.bz2" > md5_file_amd64
构建opengauss镜像
sh /opt/software/openGauss-server-master/docker/dockerfiles/buildDockerImage.sh -v 1.1.0
查看构建的opengauss相关镜像
docker images
#REPOSITORY TAG IMAGE ID CREATED SIZE
#opengauss 1.1.0 371bb14eed42 47 seconds ago 651MB
创建并启动容器
docker run --name opengauss-1.1.0 --privileged=true -d -e GS_PASSWORD=Enmo@123 -p 21600:5432 opengauss:1.1.0
外部连接数据库
gsql -d postgres -U postgres -W'Enmo@123' -h your-host-ip -p21600
数据库持久化
$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=Enmo@123 -v /opengauss:/var/lib/opengauss opengauss:1.1.0
标签:opt,1.1,部署,server,opengauss,docker,openGauss
From: https://www.cnblogs.com/jl1771/p/16989442.html