如何设置docker容器的iP? [英] How to set a docker container's iP?
本文介绍了如何设置docker容器的iP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您可以使用主机的现有IP,如下所示:
docker运行-p 127.0.0.1:80:80图像等
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.
解决方案
You can use an existing IP of the host like so:
docker run -p 127.0.0.1:80:80 image etc.
这篇关于如何设置docker容器的iP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文