mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add support for stdin_open in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
bc739a8d70
commit
84450b72cd
4 changed files with 29 additions and 24 deletions
|
@ -33,6 +33,7 @@ type ContainerSpec struct {
|
|||
User string `json:",omitempty"`
|
||||
Groups []string `json:",omitempty"`
|
||||
TTY bool `json:",omitempty"`
|
||||
OpenStdin bool `json:",omitempty"`
|
||||
Mounts []mount.Mount `json:",omitempty"`
|
||||
StopGracePeriod *time.Duration `json:",omitempty"`
|
||||
Healthcheck *container.HealthConfig `json:",omitempty"`
|
||||
|
|
|
@ -505,6 +505,7 @@ func convertService(
|
|||
Mounts: mounts,
|
||||
StopGracePeriod: service.StopGracePeriod,
|
||||
TTY: service.Tty,
|
||||
OpenStdin: service.StdinOpen,
|
||||
},
|
||||
Resources: resources,
|
||||
RestartPolicy: restartPolicy,
|
||||
|
|
|
@ -24,6 +24,7 @@ func containerSpecFromGRPC(c *swarmapi.ContainerSpec) types.ContainerSpec {
|
|||
User: c.User,
|
||||
Groups: c.Groups,
|
||||
TTY: c.TTY,
|
||||
OpenStdin: c.OpenStdin,
|
||||
Hosts: c.Hosts,
|
||||
Secrets: secretReferencesFromGRPC(c.Secrets),
|
||||
}
|
||||
|
@ -133,6 +134,7 @@ func containerToGRPC(c types.ContainerSpec) (*swarmapi.ContainerSpec, error) {
|
|||
User: c.User,
|
||||
Groups: c.Groups,
|
||||
TTY: c.TTY,
|
||||
OpenStdin: c.OpenStdin,
|
||||
Hosts: c.Hosts,
|
||||
Secrets: secretReferencesToGRPC(c.Secrets),
|
||||
}
|
||||
|
|
|
@ -185,6 +185,7 @@ func (c *containerConfig) config() *enginecontainer.Config {
|
|||
config := &enginecontainer.Config{
|
||||
Labels: c.labels(),
|
||||
Tty: c.spec().TTY,
|
||||
OpenStdin: c.spec().OpenStdin,
|
||||
User: c.spec().User,
|
||||
Env: c.spec().Env,
|
||||
Hostname: c.spec().Hostname,
|
||||
|
|
Loading…
Reference in a new issue