Skip to content

Add configurable log driver for containers#11497

Closed
agaengel wants to merge 1 commit intotestcontainers:mainfrom
agaengel:logdriver
Closed

Add configurable log driver for containers#11497
agaengel wants to merge 1 commit intotestcontainers:mainfrom
agaengel:logdriver

Conversation

@agaengel
Copy link
Copy Markdown

@agaengel agaengel commented Feb 26, 2026

Adds a container.log.driver configuration property to override the Docker log driver for all containers started by Testcontainers.

Useful when the Docker daemon defaults to a driver incompatible with log-based wait strategies (e.g. none).

Configuration

.testcontainers.properties

container.log.driver=json-file
TESTCONTAINERS_CONTAINER_LOG_DRIVER=json-file

Per-container overrides via withCreateContainerCmdModifier still take precedence.

@agaengel agaengel requested a review from a team as a code owner February 26, 2026 13:45
@agaengel agaengel marked this pull request as draft February 26, 2026 14:00
@agaengel agaengel changed the title Add configurable log driver for Ryuk container Add configurable log driver for containers Feb 26, 2026
@agaengel agaengel marked this pull request as ready for review February 26, 2026 20:55
@eddumelendez
Copy link
Copy Markdown
Member

I'd try to avoid using configuration properties. If this is currently what you want to apply to all container there is another approach you can take into account. See https://java.testcontainers.org/features/advanced_options/#using-createcontainercmdmodifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants