feat: allow network, pid in container definitions #4
2 changed files with 15 additions and 5 deletions
|
@ -96,6 +96,14 @@ func CreateContainer(definition service_definition.ContainerDefinition, knownVol
|
|||
"--replace",
|
||||
}
|
||||
|
||||
if definition.Network != "" {
|
||||
args = append(args, []string{"--network", definition.Network}...)
|
||||
}
|
||||
|
||||
if definition.PIDNamespace != "" {
|
||||
args = append(args, []string{"--pid", definition.PIDNamespace}...)
|
||||
}
|
||||
|
||||
if definition.EnvFile != "" {
|
||||
args = append(args, []string{"--env-file", definition.EnvFile}...)
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ type ContainerDefinition struct {
|
|||
Image string `yaml:"image"`
|
||||
Volumes []VolumeConfiguration `yaml:"volumes"`
|
||||
EnvFile string `yaml:"env-file"`
|
||||
Network string `yaml:"network"`
|
||||
PIDNamespace string `yaml:"pid-namespace"`
|
||||
ExtraArgs []string `yaml:"extra-args"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue