File tree Expand file tree Collapse file tree
ai/skills/dev/docker-management/references/platforms
config/dockerfiles/compose Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,13 +103,13 @@ docker run -d \
103103 --name portainer \
104104 --restart=always \
105105 -p 127.0.0.1:9443:9443 \
106- -p 127.0.0.1:8000 :8000 \
106+ -p 127.0.0.1:38000 :8000 \
107107 -v /var/run/docker.sock:/var/run/docker.sock \
108108 -v portainer_data:/data \
109109 portainer/portainer-ce:lts
110110```
111111
112- 访问 ` https://127.0.0.1:9443 ` 完成初始化。` 8000 ` 是 Edge Agent 相关端口,不需要时可以不暴露 。
112+ 访问 ` https://127.0.0.1:9443 ` 完成初始化。容器内 ` 8000 ` 是 Edge Agent 相关端口,示例映射到宿主机 ` 38000 ` 以避开常见开发端口;不需要 Edge Agent 时可以不暴露 。
113113
114114Compose 写法:
115115
@@ -121,7 +121,7 @@ services:
121121 restart : always
122122 ports :
123123 - " 127.0.0.1:9443:9443"
124- - " 127.0.0.1:8000 :8000"
124+ - " 127.0.0.1:38000 :8000"
125125 volumes :
126126 - /var/run/docker.sock:/var/run/docker.sock
127127 - portainer_data:/data
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ services:
127127 portainer :
128128 image : portainer/portainer-ce:lts
129129 restart : ${RESTART_POLICY:-unless-stopped}
130- ports : ["9443:9443", "8000 :8000"]
130+ ports : ["9443:9443", "38000 :8000"]
131131 volumes :
132132 - " /var/run/docker.sock:/var/run/docker.sock"
133133 - " ${DATA_PATH}/portainer:/data"
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ Describe 'docker compose shared template' {
104104
105105 $portainerBlock | Should -Match ' portainer/portainer-ce:lts'
106106 $portainerBlock | Should -Match ' 9443:9443'
107- $portainerBlock | Should -Match ' 8000 :8000'
107+ $portainerBlock | Should -Match ' 38000 :8000'
108108 $portainerBlock | Should -Match ' \$\{DATA_PATH\}/portainer:/data'
109109 $portainerBlock | Should -Match ' profiles: \["portainer"\]'
110110 }
You can’t perform that action at this time.
0 commit comments