From a594bbe4ae4115436eaba26e7b4f6775a4c25fc4 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 30 Sep 2024 10:20:00 -0700 Subject: [PATCH] don't truncate docker build logs --- tools/docker/lib/common | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/docker/lib/common b/tools/docker/lib/common index 061a544ad..ac00c63a6 100644 --- a/tools/docker/lib/common +++ b/tools/docker/lib/common @@ -70,7 +70,7 @@ ParseArgs() { local IFS="," # Handle the special value "all" if [[ "${ARCH_LIST}" == "all" ]]; then - # Replace with comma separated + # Replace with comma separated ARCH_LIST="${ALL_TARGET_ARCH[*]}" fi @@ -88,7 +88,7 @@ ParseArgs() { } -# Function for use with trap in the primary scripts to remove the +# Function for use with trap in the primary scripts to remove the # docker builder and restore the original directory Cleanup() { docker buildx rm certbot_builder || true @@ -106,5 +106,11 @@ CreateBuilder() { # just incase the env is not perfectly clean, remove any old instance of the builder docker buildx rm certbot_builder || true # create the builder instance - docker buildx create --name certbot_builder --driver docker-container --driver-opt=network=host --bootstrap -} \ No newline at end of file + # + # BUILDKIT_STEP_LOG_MAX_* environment variables are set to prevent docker + # from truncating build logs that can be useful during debugging. see + # https://github.com/docker/buildx/issues/484#issuecomment-749352728 + docker buildx create --name certbot_builder --driver docker-container \ + --driver-opt=network=host --driver-opt env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 \ + --driver-opt env.BUILDKIT_STEP_LOG_MAX_SPEED=-1 --bootstrap +}