mirror of
https://github.com/rancher/os.git
synced 2025-06-27 07:16:48 +00:00
Use none network for power container
This commit is contained in:
parent
2240ba04fc
commit
41277f7ca5
@ -48,6 +48,7 @@ func runDocker(name string) error {
|
|||||||
|
|
||||||
existing, err := client.ContainerInspect(context.Background(), containerName)
|
existing, err := client.ContainerInspect(context.Background(), containerName)
|
||||||
if err == nil && existing.ID != "" {
|
if err == nil && existing.ID != "" {
|
||||||
|
// remove the old version of reboot
|
||||||
err := client.ContainerRemove(context.Background(), types.ContainerRemoveOptions{
|
err := client.ContainerRemove(context.Background(), types.ContainerRemoveOptions{
|
||||||
ContainerID: existing.ID,
|
ContainerID: existing.ID,
|
||||||
})
|
})
|
||||||
@ -77,6 +78,7 @@ func runDocker(name string) error {
|
|||||||
},
|
},
|
||||||
&container.HostConfig{
|
&container.HostConfig{
|
||||||
PidMode: "host",
|
PidMode: "host",
|
||||||
|
NetworkMode: "none",
|
||||||
VolumesFrom: []string{
|
VolumesFrom: []string{
|
||||||
currentContainer.ID,
|
currentContainer.ID,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user