This article brings you relevant knowledge about Docker. It mainly introduces how docker builds the Chinese version of the portainer environment step by step. Friends who are interested should take a look at it. I hope it will be helpful to everyone.
Installation reference address: https://hub.docker.com/r/6053537/portainer-ce
1. Pull the image and start the container
```bash docker pull 6053537/portainer-ce #拉取镜像 docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock 6053537/portainer-ce
2. Visit the portainer backend address and create an administrator
16.124.12.56:9000 ip地址+9000端口
Add multiple server docker management
默认是只能查看本机的docker机器,但是可以通过其他方式实现多个docker服务器管理,首先需要远程服务器配置文件
Configure server docker file
vi /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
文件替换为如下(端口可自定义,记得linux开放响应端口。这样相当于对外暴露端口,如果服务器的端口允许外网访问,会出现安全问题。生产环境中最好不要这么做,或者配置只对部分IP开放。):
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock -H fd:// --containerd=/run/containerd/containerd.sock
Finally restart docker
systemctl daemon-reload // 1,加载docker守护线程 systemctl restart docker // 2,重启docker
Add remote server docker node
1. Add environment
2. Environment Wizard
##3. Done Recommended learning:docker video tutorial, docker usage tutorial
The above is the detailed content of Detailed graphic and text explanation of docker building portainer environment Chinese version. For more information, please follow other related articles on the PHP Chinese website!