由于服務(wù)器的80端口已經(jīng)運(yùn)行了 web服務(wù),而docker 運(yùn)行需要80端口 所以在
docker start app
root@iZ25pamnfsuZ:/var/discourse# ./launcher start app
starting up existing container
+ /usr/bin/docker start app
Error response from daemon: Cannot start container app: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Error: failed to start containers: [app]
以上錯(cuò)誤!
改如何修改 docker的80端口呢
目前 docker images
如下
root@iZ25pamnfsuZ:/var/discourse# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
local_discourse/app latest 6d767d577160 4 hours ago 1.812 GB
samsaffron/discourse 1.0.12 2285ff53ab18 12 weeks ago 1.217 GB
busybox latest 8c2e06607696 4 months ago 2.433 MB
運(yùn)行如下
root@iZ25pamnfsuZ:/var/discourse# ./launcher start app
starting up existing container
+ /usr/bin/docker start app
Error response from daemon: Cannot start container app: Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
Error: failed to start containers: [app]
前輩說(shuō) docker run -d -p 8080:80
tutum/lamp 這個(gè)解決
tutum/lamp
是指的什么呢
請(qǐng)輸入代碼
認(rèn)證高級(jí)PHP講師
tutum/lamp refers to the name of your docker images. If there is no name, use IMAGE ID
, 6d767d577160 <- The example is not true.
docker run -d -p 8080:80 images/name 命令
Point 8080 to 80 in the container.
You can access it by pointing nginx to 8080.