参考安装地址连接
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
$ sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装最新版本的 Docker Engine-Community 和 containerd,或者转到下一步安装特定版本:
$ sudo yum install docker-ce docker-ce-cli containerd.io
$ yum list docker-ce --showduplicates | sort -r
docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable
docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable
docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable
这个是指定特定版本的docker的安装
sudo yum install docker-ce-19.03.9 docker-ce-cli-19.03.9 containerd.io
$ sudo systemctl start docker
docker version
[root@localhost ~]# docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
docker ps
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7765f5165e4b enmotech/opengauss:latest "entrypoint.sh gauss…" 26 minutes ago Up 26 minutes 0.0.0.0:5432->5432/tcp opengauss
docker ps -a
docker inspect xxxedc27c2341bxxx
docker rm xxx容器IDxxx
docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 -p 5432:5432 enmotech/opengauss:latest
其中
-p 5432:5432 理解为 前面是对应的宿主机端口号,后面对应的是容器的版本号
docker restart 7765f5165e4b(容器ID)
docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 -p 5432:5432 \
-v /enmotech/opengauss:/var/lib/opengauss \
enmotech/opengauss:latest
首先要安装好docker软件
docker pull enmotech/opengauss
$ docker run --name opengauss --privileged=true -d -e GS_PASSWORD=secretpassword@123 -p 5432:5432 enmotech/opengauss:latest
https://www.modb.pro/db/27572