From f716e98ad0e9eda94da973211e5f54e88c2c1aed Mon Sep 17 00:00:00 2001 From: David Steele Date: Sat, 26 Feb 2022 11:31:52 -0600 Subject: [PATCH] Suppress errors when there is stderr output for Docker builds. Docker outputs build info to stderr even when the build is successful. This seems to be especially true on Mac M1. ContainerTest.pm already does this suppression so add it the other places where containers are built. --- doc/doc.pl | 2 +- doc/lib/pgBackRestDoc/Common/DocExecute.pm | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/doc.pl b/doc/doc.pl index 4282a000d..45b6a9edb 100755 --- a/doc/doc.pl +++ b/doc/doc.pl @@ -263,7 +263,7 @@ eval $oStorageDoc->put( $strDockerfile, "FROM ${strFrom}\n\n" . trim($oManifest->variableReplace($oHostDefine->valueGet())) . "\n"); - executeTest("docker build -f ${strDockerfile} -t ${strImage} ${strBasePath}"); + executeTest("docker build -f ${strDockerfile} -t ${strImage} ${strBasePath}", {bSuppressStdErr => true}); } } } diff --git a/doc/lib/pgBackRestDoc/Common/DocExecute.pm b/doc/lib/pgBackRestDoc/Common/DocExecute.pm index dbbc53926..8d553bb74 100644 --- a/doc/lib/pgBackRestDoc/Common/DocExecute.pm +++ b/doc/lib/pgBackRestDoc/Common/DocExecute.pm @@ -1023,7 +1023,9 @@ sub sectionChildProcess $self->{oManifest}{oStorage}->put( $strDockerfile, "FROM ${strFrom}\n\n" . trim($self->{oManifest}->variableReplace($strCommandList)) . "\n"); - executeTest("docker build -f ${strDockerfile} -t ${strPreImage} " . $self->{oManifest}{oStorage}->pathGet()); + executeTest( + "docker build -f ${strDockerfile} -t ${strPreImage} " . $self->{oManifest}{oStorage}->pathGet(), + {bSuppressStdErr => true}); # Use the pre-built image $strImage = $strPreImage;