赞
踩
export导出的镜像通过import导入后,docker run出现的错误
运行容器失败
docker run -it --name postgis -d -p 5432:5432 my_psotgis
- [root@localhost ~]# docker run -it --name postgis -d -p 5432:5432 my_psotgis
- /usr/bin/docker-current: Error response from daemon: No command specified.
- See '/usr/bin/docker-current run --help'.
用export生成镜像的问题,save生成的没问题(没有深究)
docker run最后加上bash或者/bin/bash
docker run -it --name postgis -d -p 5432:5432 my_psotgis bash
或者
docker run -it --name postgis -d -p 5432:5432 my_psotgis /bin/bash
[root@localhost ~]# docker run -it --name postgis -d -p 5432:5432 my_psotgis bash
8abf93d80fbe2949922e713687fc2d2bc188705bc73f3f2d55e3205c0546cd18
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8abf93d80fbe my_psotgis "bash" 12 seconds ago Up 11 seconds 0.0.0.0:5432->5432/tcp postgis
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。