Error response from daemon: Cannot start container System error: exec: "/bin/bash": stat /bin/bash:

自制镜像启动报错

自己制作了centos6镜像,过程中并没有报错,但启动容器时报错:

#docker run -itd  centos68-bash /bin/bash
Error response from daemon: Cannot start container System error: exec: "/bin/bash": stat /bin/bash:

最终找到原因:是导入镜像前少执行了cd命令

febootstrap -i bash -i initscripts -i wget -i yum -i iputils -i iproute -i openssh-server -i openssh-clients -i net-tools centos68 centos68-doc http://mirrors.163.com/centos/6.8/os/x86_64/
#该命令未执行
cd centos6-doc/

tar -c .|docker import - centos68-bash

总结:看来docker import时并未做任何必要的检查!

你可能感兴趣的:(docker,镜像)