How to set a docker container's iP?

后端 未结 1 1131
一整个雨季
一整个雨季 2021-01-21 12:08

Can somebody tell me how to set a container\'s ip to a specific one ? I dont want to set the bridge to set of ips. All the results i get in net is to set range of ips to the doc

相关标签:
1条回答
  • 2021-01-21 12:58

    You can use an existing IP of the host like so:

    docker run -p 127.0.0.1:80:80 image etc.
    
    0 讨论(0)
提交回复
热议问题