Portainer(基於 Go)是一個輕量級的管理界面,可以讓您輕鬆管理Docker主機或Swarm集羣。node
Portainer的使用意圖是簡單部署。它包含能夠在任何 Docker 引擎上運行的單個容器(Docker for Linux 和 Docker for Windows)。git
Portainer容許您管理 Docker 容器、image、volume、network 等。 它與獨立的 Docker 引擎和 Docker Swarm 兼容。github
docker volume create portainer_data docker run -d -p 9000:9000 --name Portainer -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
$ docker volume create portainer_data $ docker service create \ --name portainer \ --publish 9000:9000 \ --replicas=1 \ --constraint 'node.role == manager' \ --mount type=bind,src=//var/run/docker.sock,dst=/var/run/docker.sock \ --mount type=volume,src=portainer_data,dst=/data \ portainer/portainer \ -H unix:///var/run/docker.sock
version: '2' services: portainer: image: portainer/portainer command: -H unix:///var/run/docker.sock volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data volumes: portainer_data:
訪問 http://localhost:9000/docker