Skip to content

feat: fallback to platform linux/amd64 when image pull fails#837

Merged
DDtKey merged 1 commit intotestcontainers:mainfrom
trevormcdonald:pull-platform-fallback
Sep 15, 2025
Merged

feat: fallback to platform linux/amd64 when image pull fails#837
DDtKey merged 1 commit intotestcontainers:mainfrom
trevormcdonald:pull-platform-fallback

Conversation

@trevormcdonald
Copy link
Copy Markdown
Contributor

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 26, 2025

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit e38e05d
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-rust/deploys/68adead291df5b00087b1224
😎 Deploy Preview https://deploy-preview-837--testcontainers-rust.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mervyn-mccreight
Copy link
Copy Markdown
Contributor

@DDtKey WDYT behavior wise?

Copy link
Copy Markdown
Contributor

@DDtKey DDtKey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It corresponds to Java's version and generally make sense as I initially mentioned in #800 (see #800 (comment) about possible remote hosts) - so LGTM

Thanks for the contribution! 🙏

@DDtKey DDtKey merged commit 309d401 into testcontainers:main Sep 15, 2025
30 of 31 checks passed
@github-actions github-actions bot mentioned this pull request Oct 27, 2025
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>
DDtKey added a commit that referenced this pull request Oct 27, 2025
~~Alternative approach to #800 #837~~

I think this approach gives more flexibility API-wise. I am happy to add
tests if the maintainers think this is a more suitable approach.

Fixes #500, #718

Thanks in advance!

---------

Co-authored-by: Artem Medvedev <i@ddtkey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

is there any way to pass "platform" parameter when running docker images?

3 participants