Installation of docker monitoring tool Portainer

Install Portainer

  • docker node operation

1 first close selinux, setenforce 0

2 Modify /lib/systemd/system/docker.service

#>vi /lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock #Modify this line Record, if there is no /usr/bin/dockerd, please update docker to the latest version #This is equivalent to adding the monitoring method of ip and docker.sock

#>systemctl daemon-reload #Restart service#>sudo service docker restart

  • Execute on the manager node:

docker service create \ --name portainer \ --publish 9000:9000 \ --constraint 'node.role == manager' \ --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \ portainer/portainer \ -H unix:///var/run/docker.sock

Visit http://192.168.1.130:9000

 

 

Guess you like

Origin blog.csdn.net/selectgoodboy/article/details/86292079