Skip to content

Commit

Permalink
fix: handle container exec attach using TTY
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Nov 16, 2022
1 parent 0ac0f01 commit 5733288
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,15 @@ func (c *DockerContainer) Exec(ctx context.Context, cmd []string) (int, io.Reade
Detach: false,
AttachStdout: true,
AttachStderr: true,
Tty: false,
})
if err != nil {
return 0, nil, err
}

hijack, err := cli.ContainerExecAttach(ctx, response.ID, types.ExecStartCheck{})
hijack, err := cli.ContainerExecAttach(ctx, response.ID, types.ExecStartCheck{
Tty: true,
})
if err != nil {
return 0, nil, err
}
Expand Down

0 comments on commit 5733288

Please sign in to comment.