mirror of
https://github.com/containers/podman.git
synced 2025-08-05 19:02:37 +08:00
Attach stdin to container at start if it was created with --interactive
Check to see if the container's start config includes the interactive flag when determining to attach or ignore stdin stream. This is in line with behavior of Docker CLI and engine Signed-off-by: Tyler Ramer <tyaramer@gmail.com>
This commit is contained in:
@ -612,7 +612,9 @@ func (r *LocalRuntime) Start(ctx context.Context, c *cliconfig.StartValues, sigP
|
||||
if c.Attach {
|
||||
inputStream := os.Stdin
|
||||
if !c.Interactive {
|
||||
inputStream = nil
|
||||
if !ctr.Stdin() {
|
||||
inputStream = nil
|
||||
}
|
||||
}
|
||||
|
||||
// attach to the container and also start it not already running
|
||||
|
Reference in New Issue
Block a user