停止和启动容器时奇怪的docker错误

时间:2014-09-05 00:30:40

标签: docker coreos

我一直在停止并启动此容器没有问题。然后我突然发现了这个奇怪的错误。

查看以下命令的历史记录

core@ip-10-32-251-200 /vol/jenkins/war/WEB-INF/lib $ docker ps
CONTAINER ID        IMAGE                           COMMAND                CREATED             STATUS              PORTS                  NAMES
241d05c8d14f        joshuacalloway/jenkins:latest   "/usr/bin/supervisor   5 weeks ago         Up 6 days           0.0.0.0:80->8080/tcp   jenkins             
core@ip-10-32-251-200 /vol/jenkins/war/WEB-INF/lib $ docker stop 241
241
core@ip-10-32-251-200 /vol/jenkins/war/WEB-INF/lib $ docker start 241
241
core@ip-10-32-251-200 /vol/jenkins/war/WEB-INF/lib $ docker stop 241
241
core@ip-10-32-251-200 /vol/jenkins/war/WEB-INF/lib $ docker start 241
Error response from daemon: Cannot start container 241: Unit docker-241d05c8d14f0b9f18d4f8647ac76a27097354aab5d92f1aaa6c9789a85e6e3d.scope already exists.
2014/09/05 00:27:39 Error: failed to start one or more containers
core@ip-10-32-251-200 /vol/jenkins/war/WEB-INF/lib $ docker start 241
Error response from daemon: Cannot start container 241: Unit docker-241d05c8d14f0b9f18d4f8647ac76a27097354aab5d92f1aaa6c9789a85e6e3d.scope already exists.
2014/09/05 00:27:47 Error: failed to start one or more containers

1 个答案:

答案 0 :(得分:16)

这是一个问题detailed here。同时你可以解决这个问题:

sudo systemctl stop docker-241d05c8d14f0b9f18d4f8647ac76a27097354aab5d92f1aaa6c9789a85e6e3d.scope

然后启动你的容器