开发者

How do I use the IP of a container as an ENV var of another container

I am trying to set up a docker-compose file where I have 2 services. There is a RabbitMQ broker and a publisher/consumer. In the code of the publisher/consumer, I set the connection up开发者_StackOverflow using an IP from the os environment variables. However, I am not sure how I can get the IP of a different container, and set it in the ENV variable.


Just use the compose service name instead of ip.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜