由於網上仲未有完整嘅相關教程,所以以下會提供 Portainer 嘅配置:
Command Line
|
1 2 3 4 5 6 7 8 |
docker run -d \ -p 9000:9000 \ -p 9443:9443 \ --name Portainer \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /volume1/docker/portainer:/data \ portainer/portainer-ce:latest |
|
1 2 3 4 5 6 7 |
docker run -d \ -p 9001:9001 \ --name portainer_agent \ --restart=always \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /volume1/@docker/volumes:/var/lib/docker/volumes \ portainer/agent:2.16.2 |
Docker Compose
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
version: "3" services: portainer: image: portainer/portainer-ce:latest container_name: Portainer ports: - "9000:9000" - "9443:9443" volumes: - /volume1/docker/portainer/:/data - /var/run/docker.sock:/var/run/docker.sock restart: always portainer-agent: image: portainer/agent:2.16.2 container_name: Portainer_Agent ports: - "9001:9001" volumes: - /volume1/@docker/volumes:/data - /var/run/docker.sock:/var/run/docker.sock restart: always |
新增 Portainer Agent 環境
1. 喺 Add Environment 嘅介面選擇 Docker Standalone

2. 㩒 Start Wizard,揀返 Agent

3. 喺 Environment Address 嗰欄填 內網IP:9001 ,並且為新嘅環境改返個名。
