一、Portainer架构
二、基于Docker-Compose部署
# cat docker-compose.yaml version: '3' services: portainer-server: image: portainer/portainer-ce container_name: portainer-server restart: always ports: - 9000:9000 - 8000:8000 networks: - ops_default volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data volumes: portainer_data: networks: ops_default: external: true # 启动服务 docker-compose up -d # 查看服务启动状态 docker-compose ps
三、Agent部署
# cat docker-compose.yaml version: '3' services: portainer-agent: image: portainer/agent container_name: portainer-agent restart: always ports: - 9001:9001 networks: - ops_default volumes: - /var/run/docker.sock:/var/run/docker.sock - /var/lib/docker/volumes:/var/lib/docker/volumes networks: ops_default: external: true # 启动服务 docker-compose up -d # 查看服务启动状态 docker-compose ps
四、登录服务端增加Agent
参考:https://github.com/portainer/portainer
标签:compose,Portainer,CE,volumes,portainer,var,docker,安装,networks From: https://www.cnblogs.com/a120608yby/p/17061418.html