我有两个 Docker 容器
Dockerized API's
url 可以通过 Dockerized Console
访问这个想法不是传递 url,而是你想要调用的另一个容器的主机名。
见 Networking in Compose
By default Compose sets up a single network for your app. Each container for a service joins the default network and is both reachable by other containers on that network, and discoverable by them at a hostname identical to the container name.
--link
option 的原因.关于docker - 一个 Docker 容器如何调用另一个 Docker 容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44275794/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |