Skip to content

Commit

Permalink
imagebuildah: disable pseudo-terminals for RUN
Browse files Browse the repository at this point in the history
Always handle RUN instructions with no pseudo terminal, which matches
what I see with docker build 19.03.  Interactive 'buildah run' will
still have the same default behavior.

Signed-off-by: Nalin Dahyabhai <[email protected]>
  • Loading branch information
nalind committed Nov 17, 2020
1 parent 05aa527 commit e863665
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions imagebuildah/stage_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ func (s *StageExecutor) Run(run imagebuilder.Run, config docker.Config) error {
Stderr: s.executor.err,
Quiet: s.executor.quiet,
NamespaceOptions: s.executor.namespaceOptions,
Terminal: buildah.WithoutTerminal,
}
if config.NetworkDisabled {
options.ConfigureNetwork = buildah.NetworkDisabled
Expand Down
4 changes: 4 additions & 0 deletions tests/bud.bats
Original file line number Diff line number Diff line change
Expand Up @@ -2384,3 +2384,7 @@ EOF
run cmp tar1 url1
[[ "$status" -ne 0 ]]
}

@test "bud-terminal" {
run_buildah bud ${TESTSDIR}/bud/terminal
}
2 changes: 2 additions & 0 deletions tests/bud/terminal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM busybox
RUN ! tty

0 comments on commit e863665

Please sign in to comment.