From d13e2df65ba02d2f76c87f6f09c43ea857a14cc4 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 26 Jul 2018 17:04:22 +0200 Subject: [PATCH] Add missing fields in compose/types Even though those fields are not supported by `docker stack deploy` they are defined in versions `3.x` of compose schema, so the `compose` package should be able to marshal/unmarshal them. Signed-off-by: Vincent Demeester --- cli/compose/types/types.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/compose/types/types.go b/cli/compose/types/types.go index cad26d58b0..0f60fd9ec9 100644 --- a/cli/compose/types/types.go +++ b/cli/compose/types/types.go @@ -135,13 +135,16 @@ type ServiceConfig struct { Restart string `yaml:",omitempty"` Secrets []ServiceSecretConfig `yaml:",omitempty"` SecurityOpt []string `mapstructure:"security_opt" yaml:"security_opt,omitempty"` + ShmSize string `mapstructure:"shm_size" yaml:"shm_size,omitempty"` StdinOpen bool `mapstructure:"stdin_open" yaml:"stdin_open,omitempty"` StopGracePeriod *time.Duration `mapstructure:"stop_grace_period" yaml:"stop_grace_period,omitempty"` StopSignal string `mapstructure:"stop_signal" yaml:"stop_signal,omitempty"` + Sysctls StringList `yaml:",omitempty"` Tmpfs StringList `yaml:",omitempty"` Tty bool `mapstructure:"tty" yaml:"tty,omitempty"` Ulimits map[string]*UlimitsConfig `yaml:",omitempty"` User string `yaml:",omitempty"` + UserNSMode string `mapstructure:"userns_mode" yaml:"userns_mode,omitempty"` Volumes []ServiceVolumeConfig `yaml:",omitempty"` WorkingDir string `mapstructure:"working_dir" yaml:"working_dir,omitempty"`