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
原文地址:https://www.cnblogs.com/ryanzheng/p/14052589.html