How to set a docker container's iP?

99封情书 提交于 2019-12-20 03:21:30

问题


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 docker bridge.


回答1:


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

docker run -p 127.0.0.1:80:80 image etc.


来源:https://stackoverflow.com/questions/22641828/how-to-set-a-docker-containers-ip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!