feat: allow network, pid in container definitions
Some checks failed
/ build (push) Has been cancelled
Some checks failed
/ build (push) Has been cancelled
This commit is contained in:
parent
0b2e222124
commit
62eb27a0a8
2 changed files with 15 additions and 5 deletions
|
@ -96,6 +96,14 @@ func CreateContainer(definition service_definition.ContainerDefinition, knownVol
|
||||||
"--replace",
|
"--replace",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if definition.Network != "" {
|
||||||
|
args = append(args, []string{"--network", definition.Network}...)
|
||||||
|
}
|
||||||
|
|
||||||
|
if definition.PIDNamespace != "" {
|
||||||
|
args = append(args, []string{"--pid", definition.PIDNamespace}...)
|
||||||
|
}
|
||||||
|
|
||||||
if definition.EnvFile != "" {
|
if definition.EnvFile != "" {
|
||||||
args = append(args, []string{"--env-file", definition.EnvFile}...)
|
args = append(args, []string{"--env-file", definition.EnvFile}...)
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,11 +33,13 @@ type VolumeConfiguration struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContainerDefinition struct {
|
type ContainerDefinition struct {
|
||||||
Name string `yaml:"name"`
|
Name string `yaml:"name"`
|
||||||
Image string `yaml:"image"`
|
Image string `yaml:"image"`
|
||||||
Volumes []VolumeConfiguration `yaml:"volumes"`
|
Volumes []VolumeConfiguration `yaml:"volumes"`
|
||||||
EnvFile string `yaml:"env-file"`
|
EnvFile string `yaml:"env-file"`
|
||||||
ExtraArgs []string `yaml:"extra-args"`
|
Network string `yaml:"network"`
|
||||||
|
PIDNamespace string `yaml:"pid-namespace"`
|
||||||
|
ExtraArgs []string `yaml:"extra-args"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ServiceDefinition struct {
|
type ServiceDefinition struct {
|
||||||
|
|
Loading…
Reference in a new issue