我使用下面的docker命令安装造船厂
$ docker create --name shipyard-rethinkdb-data shipyard/rethinkdb
$ docker run -it -d --name shipyard-rethinkdb --restart=always --volumes-from shipyard-rethinkdb-data -p 49153:8080 -p 49154:28015 -p 29015:29015 shipyard/rethinkdb
$ docker run -it -d --name shipyard -p 8080:8080 --link shipyard-rethinkdb:rethinkdb shipyard/shipyard
问题是造船厂容器无法启动
[bu@bu ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bac72c61bdd4 shipyard/rethinkdb "/usr/bin/rethinkdb -" 25 minutes ago Up 5 minutes 0.0.0.0:29015->29015/tcp, 0.0.0.0:49153->8080/tcp, 0.0.0.0:49154->28015/tcp shipyard-rethinkdb
[bu@bu ~]$ docker start shipyard
shipyard
[bu@bu ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bac72c61bdd4 shipyard/rethinkdb "/usr/bin/rethinkdb -" 26 minutes ago Up 5 minutes 0.0.0.0:29015->29015/tcp, 0.0.0.0:49153->8080/tcp, 0.0.0.0:49154->28015/tcp shipyard-rethinkdb
系统详细信息:
操作系统:Fedora 23 64位
Docker版本:1.12.3
答案 0 :(得分:2)
由于您的问题是容器没有启动,因此在死亡之前查看它显示的任何消息会很有用。为了看到这个,我只是从你的命令
中删除了-d参数$ docker run -it --name shipyard -p 8080:8080 --link shipyard-rethinkdb:rethinkdb shipyard/shipyard
NAME:
shipyard - composable docker management
USAGE:
controller [global options] command [command options] [arguments...]
VERSION:
3.1.0 (8edbeac)
COMMANDS:
server run shipyard controller
GLOBAL OPTIONS:
--debug, -D enable debug
--help, -h show help
--version, -v print the version
因此,您应该使用server命令启动容器。