docker: Error response from daemon: Conflict. The container name “/xx“ is already in use by containe
问题:docker启动docker容器时报错
docker: Error response from daemon: Conflict. The container name "/xxxx" is already in use by container "518a610a0332457110e953ae187fe56c90efde820f76bd666bbcdeec87ac1f3e". You have to remove (or rename) that container to be able to reuse that name.
解决办法:
在此之前已经启动了相同名字的docker容器,The container name is already in use by container
You have to remove (or rename) that container to be able to reuse that name
那么你要这么查看你的容器已经存在相同名字容器呢?
只需要执行下列代码
docker ps
这样就找到了你想要找到容器,比如刚刚出现相同的名字时(将它删除再重新启动)
删除这个container
想要启动一个新的容器,可以删除已经存在的容器
docker rm 你的容器名字 --普通删除
docker rm -f xx --强制删除
重新启动这个container
也可以重新启动已经存在的容器
docker start 你的容器名字