mirror of https://github.com/docker/docs.git
Always attach STDIN if -i,--interactive is specified
There is no reason to error out or not do what the user expects when -i is specified on the cli. We should always attach to the stdin of the container in this situation. Closes #14390 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
4f69609ac2
commit
691b2851f7
|
|
@ -156,14 +156,13 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
|
||||||
return nil, nil, cmd, fmt.Errorf("%s is not a valid mac address", *flMacAddress)
|
return nil, nil, cmd, fmt.Errorf("%s is not a valid mac address", *flMacAddress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If neither -d or -a are set, attach to everything by default
|
|
||||||
if flAttach.Len() == 0 {
|
|
||||||
attachStdout = true
|
|
||||||
attachStderr = true
|
|
||||||
if *flStdin {
|
if *flStdin {
|
||||||
attachStdin = true
|
attachStdin = true
|
||||||
}
|
}
|
||||||
|
// If -a is not set attach to the output stdio
|
||||||
|
if flAttach.Len() == 0 {
|
||||||
|
attachStdout = true
|
||||||
|
attachStderr = true
|
||||||
}
|
}
|
||||||
|
|
||||||
var flMemory int64
|
var flMemory int64
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue