Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Portainer to manage multiple Docker container environments

Shulou Source: shulou.com Published: 2022-06-02 16:12:38 10月04日 Update

This article will explain in detail how to use Portainer to manage multiple Docker container environments. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Portainer manages multiple Docker container environments 1. Environmental preparation

# aliyun 2 core 8G139.196.95.123 install docker and Portainer# aliyun 1 core 2G 47.100.34.199 install docker# qingcloud 1 core 2G139.198.167.214 install docker2. Manage docker2.1 installation and run portaner

Install portaner on the server of aliyun 2core 8G

# install portainerdocker pull portainer/portainer# to start portainerdocker run-d-p 8080 var/run/docker.sock:/var/run/docker.sock 9000-- restart=always-v / var/run/docker.sock:/var/run/docker.sock-- modify the configuration file

Modify / usr/lib/systemd/system/docker.service on all three machines

# modify configuration file vim / usr/lib/systemd/system/docker.service# add configuration file content ExecStart= xxxx-H tcp://0.0.0.0:2375-H unix:///var/run/docker.sockxxx represents the original parameters Append-H tcp://0.0.0.0:2375-H unix:///var/run/docker.sock content # Save the startup file and restart the service systemctl daemon-reloadsystemctl restart docker# to see if it works ss-unlpt | grep 2375

2.3 add Node

# named docker-prod01docker-prod02# IP address 47.100.34.199Vue 2375139.198.167.214Rd 23752.4

The effect of the added docker node is as follows.

3. Trample record 3.1connection refused

FailureGet http://47.100.34.199:2375/_ping: dial tcp 47.100.34.199:2375: connect: connection refused

Profile information needs to be modified to add-H tcp://0.0.0.0:2375-H unix:///var/run/docker.sock content

This is the end of this article on "how to use Portainer to manage multiple Docker container environments". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: File environment management content configuration multiple container article effect effect more node service good practical representative information parameter address article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Information Shulou Technology Microsoft MariaDB