为泊坞窗集装箱分配IP地址? [英] Assigning IP address to docker containers?
问题描述
警告 - Docker正在大力发展,所以对现有文档的确认是可取的。
网络元素是目前在 docker-dev
下讨论的元素之一,它看起来像长期整合正在考虑 libvirt 。所以要回答你的问题NET DHCP或某些东西可能没有按你想要的方式实现。
Docker的网络实现方式有一些描述在此博文。目前, CreateBridgeIface 中的一组IP范围=nofollow> network.go 。
同时你可能想要结帐管道系统,这是一种设计用于Docker用于各种网络配置的工具。这将允许您添加和修改容器上的IP地址,创建专用网络并将容器连接到物理接口。最后,它包装较低级别的工具,但您可能会发现使用管道
更容易。
I'm new to Docker. Is it possible to assign an IP address (from a DHCP server) to Docker containers running on a host or VM? If yes, can someone point me in the correct direction. If no, is it a fundamental limitation of the container approach or it's just a feature that's not in Docker yet.
Caveat - Docker is under heavy development so confirming against current docs is advisable.
The network element is one of those under current discussion on docker-dev
, it looks like longer term integration with libvirt is being considered. So to answer your question NET DHCP or something is probably not implemented as you'd want.
Some of how Docker's networking is implemented is described in this blog post. Currently a set of IP ranges in CreateBridgeIface
in network.go.
For the meanwhile you might want to checkout pipework which is a tool designed to be used with Docker for various network configuration. This will allow you to add and modify IP addresses on your container, create private networks and connect containers to a physical interface. In the end it's wrapping lower level tools but you might find using pipework
easier.
这篇关于为泊坞窗集装箱分配IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!