Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Portainer to manage multiple Docker container environments

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report