feat: use DOCKER_DEFAULT_PLATFORM env var to specify platform#800
Merged
DDtKey merged 4 commits intotestcontainers:mainfrom Sep 15, 2025
Merged
feat: use DOCKER_DEFAULT_PLATFORM env var to specify platform#800DDtKey merged 4 commits intotestcontainers:mainfrom
DDtKey merged 4 commits intotestcontainers:mainfrom
Conversation
When the env var is set the platform is passed for both image and container creation in parity with the docker CLI. This is especially useful on apple silicon when developing for linux environments. fixes testcontainers#500, testcontainers#718
✅ Deploy Preview for testcontainers-rust ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Thank you for the contribution! 🙏 |
DDtKey
requested changes
Jun 27, 2025
DDtKey
approved these changes
Jun 27, 2025
mervyn-mccreight
approved these changes
Jul 14, 2025
Merged
DDtKey
added a commit
that referenced
this pull request
Oct 27, 2025
## 🤖 New release
* `testcontainers`: 0.25.0 -> 0.25.1
### ⚠ `testcontainers` breaking changes
`cargo-semver-checks` suggests to release `0.26.0` as new methods added
to the public trait, which is generally breaking.
But it only affects `ImageExt` which isn't generally expected to be
implemented by users. It's already implemented for all `I: Image`
So these should be safe to ignore here
```text
--- failure trait_method_added: pub trait method added ---
Description:
A non-sealed public trait added a new method without a default implementation, which breaks downstream implementations of the trait
ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.43.0/src/lints/trait_method_added.ron
Failed in:
trait method testcontainers::core::ImageExt::with_hostname in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:99
trait method testcontainers::core::ImageExt::with_exposed_host_port in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:125
trait method testcontainers::core::ImageExt::with_exposed_host_ports in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:129
trait method testcontainers::core::ImageExt::with_device_requests in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:248
trait method testcontainers::ImageExt::with_hostname in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:99
trait method testcontainers::ImageExt::with_exposed_host_port in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:125
trait method testcontainers::ImageExt::with_exposed_host_ports in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:129
trait method testcontainers::ImageExt::with_device_requests in file /tmp/.tmpDpXBCy/testcontainers-rs/testcontainers/src/core/image/image_ext.rs:248
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
## [0.25.1] - 2025-10-27
### Details
#### Bug Fixes
- Replace tokio-tar with astral-tokio-tar
([#852](#852))
#### Documentation
- Rustdoc for builder API
([#820](#820))
#### Features
- Use DOCKER_DEFAULT_PLATFORM env var to specify platform
([#800](#800))
- Fallback to platform linux/amd64 when image pull fails
([#837](#837))
- Add support for devices request
([#832](#832))
- Add configurable tmpfs mount sizes
([#853](#853))
- Support `http_wait` functionallity without tls dependencies
([#850](#850))
- Add container hostname support
([#848](#848))
- Expose host ports between host and containers via ssh sidecar
([#846](#846))
#### Miscellaneous Tasks
- Update bollard-stubs requirement from =1.48.3-rc.28.0.4 to
=1.49.0-rc.28.3.3
([#828](#828))
#### Refactor
- Remove bollard_stubs dependency as bollard re-exports it
([#844](#844))
#### Testing
- Avoid flakiness in `platform` test
- Switch to testcontainers/helloworld and reduce some flakiness
([#855](#855))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Artem Medvedev <i@ddtkey.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the env var is set the platform is passed for both image and container creation in parity with the docker CLI.
This is especially useful on apple silicon when developing for linux environments.
fixes #500, #718