1
0
mirror of https://github.com/rancher/os.git synced 2025-09-09 10:40:30 +00:00

Use none network for power container

(cherry picked from commit 41277f7ca5)
This commit is contained in:
niusmallnan
2019-01-08 15:19:08 +08:00
parent 9177f60ffd
commit f2189b199b

View File

@@ -49,6 +49,7 @@ func runDocker(name string) error {
existing, err := client.ContainerInspect(context.Background(), containerName)
if err == nil && existing.ID != "" {
// remove the old version of reboot
err := client.ContainerRemove(context.Background(), types.ContainerRemoveOptions{
ContainerID: existing.ID,
})
@@ -77,7 +78,8 @@ func runDocker(name string) error {
},
},
&container.HostConfig{
PidMode: "host",
PidMode: "host",
NetworkMode: "none",
VolumesFrom: []string{
currentContainer.ID,
},