docker/compose中links/external_links的区别

docker/compose中links/external_links的区别

 

参考:

http://blog.csdn.net/halcyonbaby/article/details/47904085

http://stackoverflow.com/questions/35154441/docker-compose-links-vs-external-links

 

将两个服务链接 起来,使之可以通信。方法是设置/etc/hosts的域名解析。

 

 

external_links

 

与外部创建(可以是之前调用compose通过其他yml创建的,也可以是手工创建的容器)的容器link起来,使之可以通信。

 

If you want to link a container inside of the docker-compose.yml to another container that was not included in the same docker-compose.yml or started in a different manner then you can use external_links and you would set the link to the container's name. 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值