testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

feat: allow saving specific platforms for an image

Open LaurentGoderre opened this issue 5 months ago • 2 comments

What does this PR do?

This introduces a way to pass image save options (like platform) to the image client. This allows saving a specific architecture for an image.

Why is it important?

With OCI multi-arch images, it is sometimes needed to save image for a different architecture than the current one. This changes allows to control the behavior instead of defaulting to the current platform.

LaurentGoderre avatar Jun 26 '25 18:06 LaurentGoderre

Deploy Preview for testcontainers-go ready!

Name Link
Latest commit 3360483bab56ea207563474000099554b7e64d91
Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/68c835de977c8b000816c5d4
Deploy Preview https://deploy-preview-3218--testcontainers-go.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.

netlify[bot] avatar Jun 26 '25 18:06 netlify[bot]

@stevenh updated! Thanks for the review!

LaurentGoderre avatar Jun 27 '25 13:06 LaurentGoderre

FYI, we are using a simplified version of this change internally for our tests without a problem

LaurentGoderre avatar Jun 30 '25 16:06 LaurentGoderre

For reference, we addressed this in the go-sdk too: https://pkg.go.dev/github.com/docker/go-sdk/image#SaveOption

mdelapenya avatar Jul 01 '25 04:07 mdelapenya

@neersighted implemented your suggestion!

LaurentGoderre avatar Jul 01 '25 17:07 LaurentGoderre