docker创建容器命令时:Error response from daemon: No command specified
docker创建容器命令时:Error response from daemon: No command specified[root@test3 containers]# docker run -itd --name=container4 ubuntu-ssh-20190622docker: Error response from daemon: No command specified....
docker创建容器命令时:Error response from daemon: No command specified
[root@test3 containers]# docker run -itd --name=container4 ubuntu-ssh-20190622
docker: Error response from daemon: No command specified.
See 'docker run --help'.
可以试试别的镜像,发现有的可以创建容器,有的不可以,其实问题答案已经很明显:
[root@test3 containers]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-ssh-20190622 latest af84d755fccd 37 minutes ago 240MB
ubuntu-ssh-20190622 ansible e91bf9461302 21 hours ago 240MB
ubuntu latest 4c108a37151f 4 days ago 64.2MB
busybox latest e4db68de4ff2 8 days ago 1.22MB
httpd latest e77c77f17b46 11 days ago 140MB
没有cmd命令,使用docker inspect 【镜像名】查看下不能create容器的镜像,里面的cmd是否为null,再看看另一个是不是存在值。解决方法就是加上:
假如我的镜像名:
[root@test3 containers]# docker create ubuntu-ssh-20190622:ansible /bin/bash
163f0d4046c4282da375344ca871a83bf1cfe175b73acf178a58138c315a922a
更多推荐
所有评论(0)