Shipyard quick start上的步骤,默认把宿主机的8080端口和container的8080端口绑定
docker run -it -d --name shipyard-rethinkdb-data --entrypoint /bin/bash shipyard/rethinkdb echo data vol for shipyard rethinkdb
docker run -it -P -d --name shipyard-rethinkdb --volumes-from shipyard-rethinkdb-data shipyard/rethinkdb
docker run -it -p 8080:8080 -d --name shipyard --link shipyard-rethinkdb:rethinkdb shipyard/shipyard
</pre><ul class="task-list" style="padding:0px 0px 0px 2em; margin-top:0px; margin-bottom:16px; color:rgb(51,51,51); font-family:'Helvetica Neue',Helvetica,'Segoe UI',Arial,freesans,sans-serif; font-size:16px; line-height:25.600000381469727px"><li style=""></li><li style="">另一篇文章上看到的,把宿主机的某一个端口绑定到container的8080上,更灵活</li><li style="">Start RethinkDB: <code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; line-height:normal; padding:0.2em 0px; margin:0px">docker run -it -P -d --name shipyard-rethinkdb shipyard/rethinkdb</code></li><li style="">Get the port of the RethinkDB container: Get the port of Shipyard: 启动shipyard command line:docker run -it --rm -e SHIPYARD_URL=http://<your-host-ip>:<shipyard-port> shipyard/shipyard-clidocker run -it --rm -e SHIPYARD_URL=http://10.58.9.85:8080 shipyard/shipyard-cli有关docker的一些命令:可以查看我mentor的blog来了解怎样安装dockerDocker删除所有容器:udo docker rm `sudo docker ps -a -q`
</pre>Shipyard agent:<div></div><div><span style="font-family:Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif; font-size:14px; color:#333333"><span style="line-height:25.600000381469727px"></span></span><pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; color:rgb(51,51,51); background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; line-height:inherit; padding:0px; margin:0px; word-break:normal; border:0px; display:inline; word-wrap:normal; background:transparent"></code><pre style="margin-top:0px; margin-bottom:16px; color:rgb(51,51,51); overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; line-height:1.45; padding:16px; word-wrap:normal; background-color:rgb(247,247,247)"><pre style="overflow:auto; font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; font-size:14px; margin-top:0px; margin-bottom:16px; line-height:1.45; padding:16px; word-wrap:normal; color:rgb(51,51,51); background-color:rgb(247,247,247)"><code style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace; line-height:inherit; padding:0px; margin:0px; word-break:normal; border:0px; display:inline; word-wrap:normal; background:transparent">docker run -i -t -v /var/run/docker.sock:/docker.sock \
-e IP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1;}'` \
-e URL=http://<shipyard-host>:8000 -p 4500:4500 shipyard/agent</code>
docker run -i -d -t -v /var/run/docker.sock:/docker.sock -e IP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{print $1;}'` -e URL=http://10.58.9.85:8080 -p 4500:4500 shipyard/shipyard-agent
这时安装在host机上的shipyard-agent 就开始监听4500端口的请求,接受来自
URL=http://10.58.9.85:8080
处的查询请求