docker: driver failed programming external connectivity on endpoint webserver

后端 未结 12 1951
陌清茗
陌清茗 2020-12-23 19:16

I am trying to run a docker example following this documentation

This is my command:

docker run -d -p 80:80 --name webserver nginx
<
12条回答
  •  北海茫月
    2020-12-23 19:29

    From your error message, the EADDRINUSE indicates port 80 is already in use on either the docker VM or possibly directly on your laptop. You can either stop whatever is running on that port, or change the port used in your Docker, command. To change to the external port 8080, use:

    docker run -d -p 8080:80 --name webserver nginx
    

提交回复
热议问题