mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
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:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user