Skip to content

Commit

Permalink
Suppress errors when there is stderr output for Docker builds.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dwsteele committed Feb 26, 2022
1 parent 53de3e3 commit f716e98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/doc.pl
Expand Up @@ -263,7 +263,7 @@ =head1 SYNOPSIS
$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});
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion doc/lib/pgBackRestDoc/Common/DocExecute.pm
Expand Up @@ -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;
Expand Down

0 comments on commit f716e98

Please sign in to comment.