Merge pull request #237 from AikidoSec/feature/adjust-docker-logging

test(e2e): capture docker build output instead of ignoring it
This commit is contained in:
bitterpanda 2025-12-11 23:49:11 +01:00 committed by GitHub
commit 4623f3eff8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -33,12 +33,16 @@ export class DockerTestContainer {
].join(" ");
execSync(
`docker build -t ${imageName} -f ${dockerFile} ${contextPath} ${buildArgs}`,
`docker build --progress=plain -t ${imageName} -f ${dockerFile} ${contextPath} ${buildArgs}`,
{
stdio: "ignore",
stdio: "pipe",
maxBuffer: 10 * 1024 * 1024, // Default is 1MB, increase to 10MB to account for large 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}`);
}
}

View file

@ -41,7 +41,7 @@ RUN apt-get install -y fish && \
touch /root/.config/fish/config.fish
# Install Volta and Node.js
RUN curl https://get.volta.sh | bash
RUN curl -fsSL https://get.volta.sh | bash
RUN volta install node@${NODE_VERSION}
RUN volta install npm@${NPM_VERSION}
RUN volta install yarn@${YARN_VERSION}