2015-06-01 303 views
0

,它沒有像這樣:碼頭工人無法啓動容器

[[email protected] ~]# docker run -it -p 40000:40000 docker.io/centos:7 /bin/bash 
FATA[0001] Error response from daemon: Cannot start container f3acda2a65a1521630694a9e019cc8a7131dc58dd10bdfcaa85d1e28f434d8f4: (exit status 1) 

,這是我的ENV:

[[email protected] ~]# uname -r 
3.10.0-229.el7.x86_64 
[[email protected] ~]# docker version 
Client version: 1.6.0 
Client API version: 1.18 
Go version (client): go1.4.2 
Git commit (client): 8aae715/1.6.0 
OS/Arch (client): linux/amd64 
Server version: 1.6.0 
Server API version: 1.18 
Go version (server): go1.4.2 
Git commit (server): 8aae715/1.6.0 
OS/Arch (server): linux/amd64 

,但如果我重新啓動泊塢窗服務,運行命令有效。

[[email protected] ~]# service docker restart 
Redirecting to /bin/systemctl restart docker.service 
[[email protected] ~]# docker run -it -p 40000:40000 docker.io/centos:7 /bin/bash 
[[email protected] /]# ls 
bin dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var 

誰能告訴我是什麼原因導致了這個問題?

回答

0

也許您要使用的端口已被其他容器佔用。 因此,當您重新啓動泊塢窗服務時,它將關閉此容器。

你可以看看運行容器使用docker ps