How to reach docker containers by name instead of IP address?

前端 未结 6 1717
醉梦人生
醉梦人生 2020-12-29 17:44

Is there a way I can reach my docker containers using names instead of ip addresses?

I\'ve heard of pipework and I\'ve seen some dns and hostname type options for do

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 18:25

    I changed the --net parameter with --network parameter and it runs as expected:

    docker network create 
    docker run --network  --name  
    docker run --network  --name  
    

提交回复
热议问题