Skip to content

Conversation

mominul
Copy link
Contributor

@mominul mominul commented Sep 14, 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!

Copy link

netlify bot commented Sep 14, 2025

Deploy Preview for testcontainers-rust ready!

Name Link
🔨 Latest commit ba9f79e
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-rust/deploys/68d12e14c2958b0008faa792
😎 Deploy Preview https://deploy-preview-838--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.

@DDtKey
Copy link
Contributor

DDtKey commented Sep 14, 2025

Hi @mominul 👋

Thanks for the contribution!

I think we may want to have both, but platform detection relying on default Docker's methods (DOCKER_DEFAULT_PLATFORM) looks like useful and needed feature.
As it's typical use-case for users and run the same code on different platforms (e.g developer with Apple Silicon, CI on linux + amd64 and etc)

Exposing a way to configure platform from the code looks reasonable as well, but it's more like addition, not a replacement of #800 & #837

What do you think about co-existence of both approaches? (with the following priory: explicitly configured in the code > auto-detection > fallback)

@mominul
Copy link
Contributor Author

mominul commented Sep 20, 2025

@DDtKey That would be great! I have rebased my changes upon #800 & #837 Can you have a look if you are okay with it? The CI failures are unrelated to these changes I think.

Copy link
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 looks good to me and provides enough of flexibility to users! 🚀

Thanks for the contribution!

@mervyn-mccreight WDYT?
It follows my suggestion above with the following priority:

  • explicit config from code (this PR)
  • auto-detected platform
  • fallback to default

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?
2 participants