Redirect buildx build output to stdout

Docker buildx build outputs the build logs to stderr by default.
SSHKit displays stderr logs in red, which can suggest that an error has
occurred.

Redirect the output to stdout, so it shows in green. If there is an
error, the output will be repeated in red anyway.

Fixes: https://github.com/basecamp/kamal/issues/1356
This commit is contained in:
Donal McBreen
2025-04-21 10:19:36 +01:00
parent cd9d01b016
commit 93d1bd1369
3 changed files with 25 additions and 24 deletions

View File

@@ -20,7 +20,8 @@ class Kamal::Commands::Builder::Base < Kamal::Commands::Base
*([ "--builder", builder_name ] unless docker_driver?),
*build_tag_options(tag_as_dirty: tag_as_dirty),
*build_options,
build_context
build_context,
"2>&1"
end
def pull