-
-
Notifications
You must be signed in to change notification settings - Fork 340
feat: Support configuring Docker API version #1576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support configuring Docker API version #1576
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary by CodeRabbit
WalkthroughThis change introduces configurable Docker API version support across Testcontainers. A new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Settings as TestcontainersSettings
participant EnvConfig as EnvironmentConfiguration
participant PropsConfig as PropertiesFileConfiguration
participant AuthConfig as DockerEndpointAuthenticationConfiguration
participant Client as DockerApiClient
participant Docker as Docker Engine
User->>Settings: Access DockerApiVersion
Settings->>EnvConfig: GetDockerApiVersion()
alt Env var set
EnvConfig-->>Settings: Version
else Env var missing
Settings->>PropsConfig: GetDockerApiVersion()
alt Property set
PropsConfig-->>Settings: Version
else Property missing
Settings-->>Settings: Default 1.44
end
end
Settings->>AuthConfig: Version property
AuthConfig-->>Client: authConfig.Version
Client->>Docker: CreateClient(version)
Docker-->>Client: Configured client
Client-->>User: Success
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Areas requiring attention:
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-11-08T09:04:00.045ZApplied to files:
🧬 Code graph analysis (4)src/Testcontainers/Builders/DockerEndpointAuthenticationProvider.cs (1)
src/Testcontainers/Configurations/AuthConfigs/DockerEndpointAuthenticationConfiguration.cs (5)
src/Testcontainers/Clients/DockerApiClient.cs (5)
tests/Testcontainers.Tests/Unit/Containers/Unix/ProtectDockerDaemonSocketTest.cs (5)
🔇 Additional comments (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What does this PR do?
Docker Engine v29 introduces breaking changes that make Testcontainers and the Docker.DotNet implementation incompatible. I had a quick chat with @eddumelendez, who mentioned that pinning the API to version
1.44, which is the most widely used and compatible version, works as a temporary workaround until Docker.DotNet and Testcontainers fully support the new version. This was also mentioned in the blog post referenced in the release notes.@KSlingerland It would be really helpful if you could test pinning the version as mentioned in the issue. After that, I think we can merge the PR and publish a new version quickly.
Why is it important?
Makes sure Testcontainers for .NET works with Docker Engine v29.
Related issues