Docker shipyard 笔记

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
处的查询请求

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值