https://docs.portainer.io/v/ce-2.9/start/install/server/docker/linux
shell>docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
部署成功
如何管理多个docker主机
管理其他Docker主机,需要开启Docker API:
shell>vi /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
shell>systemctl daemon-reload
shell>systemctl restart docker
shell>ss -anpt | grep 2375