docs(zh-cn): service discovery apparently a thing

This commit is contained in:
geminiyellow 2016-12-02 19:36:31 +09:00
parent 79de64d826
commit adadf3770b

View file

@ -344,7 +344,7 @@ Docker 的版本化文件系统是基于层的。就像[git的提交或文件变
## 链接(Links) ## 链接(Links)
链接(Links)[通过 TCP/IP 端口](https://docs.docker.com/userguide/dockerlinks/)实现了 Docker 容器之间的通讯。[链接到 Redis](https://docs.docker.com/examples/running_redis_service/) 和 [Atlassian](https://blogs.atlassian.com/2013/11/docker-all-the-things-at-atlassian-automation-and-wiring/) 是两个可用的例子。你还可以(0.11 开始)[通过 hostname 关联链接](https://docs.docker.com/userguide/dockerlinks/#updating-the-etchosts-file)。 链接(Links)[通过 TCP/IP 端口](https://docs.docker.com/userguide/dockerlinks/)实现了 Docker 容器之间的通讯。[链接到 Redis](https://docs.docker.com/examples/running_redis_service/) 和 [Atlassian](https://blogs.atlassian.com/2013/11/docker-all-the-things-at-atlassian-automation-and-wiring/) 是两个可用的例子。你还可以[通过 hostname 关联链接](https://docs.docker.com/userguide/dockerlinks/#updating-the-etchosts-file)。
注意: 如果你希望容器之间**只**通过链接进行通讯,在启动 docker 守护进程的时候请添加参数 `-icc=false` 来禁用内部进程通讯。 注意: 如果你希望容器之间**只**通过链接进行通讯,在启动 docker 守护进程的时候请添加参数 `-icc=false` 来禁用内部进程通讯。
@ -369,9 +369,9 @@ $ALIAS_PORT_1337_TCP_ADDR
之后你就可以通过这种方式来链接它了。 之后你就可以通过这种方式来链接它了。
要删除链接,通过命令 `docker rm --link `。 要删除链接,通过命令 `docker rm --link`。
如果你想跨 docker 主机链接,你可以查看 [Swarm](https://docs.docker.com/engine/swarm/) 部分。. 在 [stackoverflow 上的这个链接](https://stackoverflow.com/questions/21283517/how-to-link-docker-services-across-hosts)也提供了一些关于如何跨 docker 主机进行链接的好方式 通常docker 服务之间的链接,是"服务发现"的一个子集,如果你打算在生产中大规模使用 Docker这将是一个很大的问题。请参阅[The Docker Ecosystem: Service Discovery and Distributed Configuration Stores](https://www.digitalocean.com/community/tutorials/the-docker-ecosystem-service-discovery-and-distributed-configuration-stores)获得更多细节
## 卷标(Volumes) ## 卷标(Volumes)