docker: driver failed programming external connectivity on endpoint webserver

后端 未结 12 1954
陌清茗
陌清茗 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:42

    windows users: docker description

    On Windows systems, CTRL+C does not stop the container. So, first type CTRL+C to get the prompt back (or open another shell), then type docker container ls to list the running containers, followed by docker container stop to stop the container. Otherwise, you get an error response from the daemon when you try to re-run the container in the next step.

    I had the same problem, I thought with CTRL+C stoped the container but it was not the case, any af the answer above works because they all stop containers, restarting docker or stoping container explicity.

    I prefer:

    docker container ls #list containers running
    docker stop [container id] #replace [container id] with the container id running
    

提交回复
热议问题