dockerinit: set IP address

Set the IP address in dockerinit instead of lxc utils, to prepare for
using libvirt-lxc.
This commit is contained in:
Josh Poimboeuf
2013-12-12 19:57:11 -06:00
parent f7c7f7978c
commit ecc51cd465
3 changed files with 40 additions and 11 deletions
+5 -1
View File
@@ -574,7 +574,11 @@ func (container *Container) Start() (err error) {
// Networking
if !container.Config.NetworkDisabled {
params = append(params, "-g", container.network.Gateway.String())
network := container.NetworkSettings
params = append(params,
"-g", network.Gateway,
"-i", fmt.Sprintf("%s/%d", network.IPAddress, network.IPPrefixLen),
)
}
// User