1、官網node
官網:http://www.portainer.io
演示地址:http://demo.portainer.io 用戶名:admin 密碼:tryportainerdocker
2、建立 docker-compose.yml,內容以下:工具
version: '3'
services:
portainer:
image: portainer/portainer
ports:
- "21999:9000"
command: "-H unix:///var/run/docker.sock"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/mnt/disk/docker/portainer/data:/data"
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints:
- node.hostname==host-192-168-1-22
3、執行:spa
docker stack deploy -c docker-compose.yml portainerunix
4、檢查運行狀況:rest
ss -tanlcode
5、中止blog
docker stack rm portainer部署