Docker modifies port 80

  docker, question

Since the server’s 80 ports are already running the web service, and docker needs 80 ports to run, the server’s 80 ports are already running in the

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]

The above mistake!

How to Modify docker’s 80 Port

At presentdocker imagesAs follows

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

The operation is as follows

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]

The elder saiddocker run -d -p 8080:80Tutum/lamp

tutum/lampWhat do you mean
Please enter the code

Tutum/lamp refers to the name of your docker images. Use if there is no nameIMAGE ID, 6d767d577160 <- the example is not true.

Dockerrun-d-p8080: 80images/name commandPoint 8080 to 80 in the container.

You can now use nginx to point to 8080.