docker: Error response from daemon: Conflict. The container name

问题

docker: Error response from daemon: Conflict. The container name "/xiangheGuosanguan20200428" is already in use by container "27dfa1fc17bc3eb00f208abdc9d10c6bc2066ba1929a                                                                b64cf456aa8802aa706e".

原因

docker: Error response from daemon: Conflict. The container name_第1张图片

解决

命令1

查看所有运行的容器

docker ps

找到你容器对应的ID

命令2

docker rm 27dfa1fc17bc

删除时发现报错

 Error response from daemon: You cannot remove a running container 27dfa1fc17bc3eb00f208abdc9d10c6bc2066ba1929ab64cf456aa8802aa706e. Stop the container before attempting removal or force remove

docker: Error response from daemon: Conflict. The container name_第2张图片

命令3

停止你所对应的程序

 docker stop xiangheGuosanguan20200428

docker: Error response from daemon: Conflict. The container name_第3张图片

命令4

重新运行

docker run -d --name xiangheGuosanguan20200428 -p 8429:8383 -e context-path=xiangheGuosanguan20200428 -e auth-Url= -e httpName=https xianghe_guosanguan                         20200309:2.0

docker: Error response from daemon: Conflict. The container name_第4张图片
如果还是报错看下一篇链接,不报错就部署成功了

docker: Error response from daemon: Conflict. The container name "/xiangheGuosanguan20200428" is already in use by container "27dfa1fc17bc3eb00f208abdc9d10c6bc2066ba1929ab64cf456aa8802aa706e". You have to remo                         ve (or rename) that container to be able to reuse that name.
See 'docker run --help'.

点我继续解决

你可能感兴趣的:(Linux,docker)