1
0
mirror of https://github.com/docker/cli.git synced 2026-01-15 07:40:57 +03:00

Merge pull request #9107 from ashahab-altiscale/9062-linked-container

Share network namespace of containers with lxc
Upstream-commit: 5c863f983df6ebc913890bd6095cc47d8a3a624b
Component: engine
This commit is contained in:
Michael Crosby
2014-11-13 18:25:38 -08:00

View File

@@ -86,10 +86,17 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
"lxc-start",
"-n", c.ID,
"-f", configPath,
"--",
c.InitPath,
}
if c.Network.ContainerID != "" {
params = append(params,
"--share-net", c.Network.ContainerID,
)
}
params = append(params,
"--",
c.InitPath,
)
if c.Network.Interface != nil {
params = append(params,
"-g", c.Network.Interface.Gateway,