由于服务器的80端口已经运行了 web服务,而docker 运行需要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]
以上错误!
改如何修改 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
运行如下
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]
前辈说 docker run -d -p 8080:80
tutum/lamp 这个解决
tutum/lamp
是指的什么呢
请输入代码
PHPz2017-04-22 08:58:23
tutum/lamp는 도커 이미지의 이름을 나타냅니다. 이름이 없으면 IMAGE ID
, 6d767d577160 <- 예시는 사실이 아닙니다.
docker run -d -p 8080:80 images/name 命令
용기에 8080~80을 가리킵니다.
nginx를 8080으로 지정하여 액세스할 수 있습니다.