1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-17 20:58:34 +02:00

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.
This commit is contained in:
David Steele 2022-02-26 11:31:52 -06:00
parent 53de3e3aeb
commit f716e98ad0
2 changed files with 4 additions and 2 deletions

View File

@ -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});
}
}
}

View File

@ -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;