You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Include the build output when an image build fails #1508
When GenericContainer.fromDockerfile(...).build() fails, for example because a RUN step exits non-zero, the error is:
Failed to build image
The build output is only written to the testcontainers:build debug log, so the failing step is invisible unless the run is repeated with DEBUG=testcontainers*.
Expected
The thrown error includes the failing step's output, or the last lines of the build output.
Where
packages/testcontainers/src/container-runtime/clients/image/docker-image-client.ts sends build output to the build log only.
packages/testcontainers/src/generic-container/generic-container-builder.ts throws Failed to build image when the image doesn't exist after the build.
Notes
Check both the classic builder and BuildKit (withBuildkit()).
Activity