docker 容器名称冲突问题解决

执行 docker run 命令遇到了以下错误

docker: Error response from daemon: Conflict. The container name "/lnmp" is already in use by container "329e*******". You have to remove (or rename) that container to be able to reuse that name.

使用 docker ps 命令发现存在运行着一个相同名字的容器,停止并删除该容器就可以启动新的容器了

使用 docker ps 获取 container ID

然后使用以下命令停止和删除

docker kill fd3c0c622af6

docker rm fd3c0c622af6

 

posted @ 2020-11-28 14:52  Ryan_zheng  阅读(4843)  评论(0编辑  收藏  举报