当我启动具有指定名称的docker镜像时,docker报告已经运行的docker容器已经使用了该名称。我通过查看docker ps -a
找不到该容器,也无法通过ID或名称删除它。如何找到冲突的运行容器?如何进一步调试这种情况?
myuser@myhostname$ docker --version
Docker version 1.11.2, build b9f10c9
myuser@myhostname$ docker run --name=myimage-build ubuntu
docker: Error response from daemon: Conflict. The name "/myimage-build" is already in use by container 946747f7608fb17e8f1677152e44a21aeb9f4d3cfda9b30bc7cd7a92411e533e. You have to remove (or rename) that container to be able to reuse that name..
See 'docker run --help'.
myuser@myhostname$ docker ps -a | grep 9467
myuser@myhostname$
myuser@myhostname$ docker rm -f 946747f7608fb17e8f1677152e44a21aeb9f4d3cfda9b30bc7cd7a92411e533e
Error response from daemon: No such container: 946747f7608fb17e8f1677152e44a21aeb9f4d3cfda9b30bc7cd7a92411e533e
myuser@myhostname$ docker rm -f myimage-build
Error response from daemon: No such container: myimage-build
myuser@myhostname$
myuser@myhostname$ docker run --name=myimage-build ubuntu
docker: Error response from daemon: Conflict. The name "/myimage-build" is already in use by container 946747f7608fb17e8f1677152e44a21aeb9f4d3cfda9b30bc7cd7a92411e533e. You have to remove (or rename) that container to be able to reuse that name..
See 'docker run --help'.
答案 0 :(得分:-1)
饶
我和Wojtek在同一个团队工作。
我运行码头工作检查你的建议:
docker inspect --format='{{.Name}}' $(docker ps -aq --no-trunc)
/an-unrelated-app
似乎没有。