diff --git a/test/e2e/DockerTestContainer.js b/test/e2e/DockerTestContainer.js index 54b0f64..a7df63c 100644 --- a/test/e2e/DockerTestContainer.js +++ b/test/e2e/DockerTestContainer.js @@ -35,10 +35,14 @@ export class DockerTestContainer { execSync( `docker build --progress=plain -t ${imageName} -f ${dockerFile} ${contextPath} ${buildArgs}`, { - stdio: "inherit", + stdio: "pipe", + maxBuffer: 50 * 1024 * 1024, // 50MB buffer to capture verbose build logs } ); } catch (error) { + // Only print the build logs if the build fails + if (error.stdout) console.log(error.stdout.toString()); + if (error.stderr) console.error(error.stderr.toString()); throw new Error(`Failed to build Docker image: ${error.message}`); } }