How to create a bidirectional link between containers?

前端 未结 5 1240
梦如初夏
梦如初夏 2020-11-30 01:00

I have to link two containers so they can see each other. Of course the following...

docker run -i -t --name container1 --link container2:container2 ubuntu:t         


        
5条回答
  •  北海茫月
    2020-11-30 01:51

    I solved this by appending an ip-table into /etc/hosts of each container, for example

提交回复
热议问题