Add init support in 3.7 schema

> Run an init inside the container that forwards signals and reaps
  processes

This is supported on `run` and now on Swarm services too, so it's also
possible to have in on a composefile :).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2018-06-18 10:48:03 +02:00
committed by Silvin Lubecki
parent e529043c51
commit cc26da94ed
5 changed files with 85 additions and 24 deletions

View File

@ -119,7 +119,9 @@ type ServiceConfig struct {
Hostname string `yaml:",omitempty"`
HealthCheck *HealthCheckConfig `yaml:",omitempty"`
Image string `yaml:",omitempty"`
Init *bool `yaml:",omitempty"`
Ipc string `yaml:",omitempty"`
Isolation string `mapstructure:"isolation" yaml:"isolation,omitempty"`
Labels Labels `yaml:",omitempty"`
Links []string `yaml:",omitempty"`
Logging *LoggingConfig `yaml:",omitempty"`
@ -142,8 +144,8 @@ type ServiceConfig struct {
User string `yaml:",omitempty"`
Volumes []ServiceVolumeConfig `yaml:",omitempty"`
WorkingDir string `mapstructure:"working_dir" yaml:"working_dir,omitempty"`
Isolation string `mapstructure:"isolation" yaml:"isolation,omitempty"`
Extras map[string]interface{} `yaml:",inline"`
Extras map[string]interface{} `yaml:",inline"`
}
// BuildConfig is a type for build