docker: Error response from daemon: Conflict

docker: Error response from daemon: Conflict. The container name "/vkaibot openyino2021” s already in use by container “ad35ea8324dbdcc4772f00d6c3ff9b7f3587244093a4901d5bdfbede878ed005”. You have to remove (or rename) that container to beable toreuse that name.

在使用docker容器的时候会碰到类似这样的问题

docker: Error response from daemon: Conflict. The container name "/vkaibot openyino2021” s already in use by container "ad35ea8324dbdcc4772f00d6c3ff9b7f3587244093a4901d5bdfbede878ed005". You have to remove (or rename) that container to beable toreuse that name.

出现此类问题很大原因是应为docker里面容器已经存在,我们可以执行这个命令查询重名容器ID

docker ps -a

找到对应的ID后

docker rm fb087642b497(镜像ID)

使用rm命令就可删除重名的容器

另外补充下,回到容器可以使用: docker attach 容器名 退出和关闭容器不能用CTRL+C,需要运行命令: exit

今天的总结就这多了,讲的不好欢迎指正

经验分享 程序员 微信小程序 职场和发展