Skip to content

Add the ability to specify an image's platform.#7313

Merged
eddumelendez merged 4 commits into
testcontainers:mainfrom
shawjef3:image-platform
Nov 29, 2023
Merged

Add the ability to specify an image's platform.#7313
eddumelendez merged 4 commits into
testcontainers:mainfrom
shawjef3:image-platform

Conversation

@shawjef3

Copy link
Copy Markdown
Contributor

It's possible to specify the platform for a container by using GenericContainer#withCreateContainerCmdModifier. However, it's not possible to do the same when creating an image, and so it's not possible to both create and test an image for a platform.

This adds ImageFromDockerfile#withBuildImageCmdModifier which makes this possible.

#7312

It's possible to specify the platform for a container by using `GenericContainer#withCreateContainerCmdModifier`.
However, it's not possible to do the same when creating an image, and so it's
not possible to both create and test an image for a platform.

This adds `ImageFromDockerfile#withBuildImageCmdModifier` which makes this possible.
@shawjef3 shawjef3 requested a review from a team July 18, 2023 19:12
@eddumelendez eddumelendez added this to the next milestone Nov 29, 2023
@eddumelendez eddumelendez merged commit d5dc4d3 into testcontainers:main Nov 29, 2023
@eddumelendez

Copy link
Copy Markdown
Member

Thanks for your contribution, @shawjef3 !

fokion pushed a commit to fokion/testcontainers-java that referenced this pull request Jan 18, 2025
`withBuildImageCmdModifier` allows to customize the `BuildImageCmd`
created with `ImageFromDockerfile`.

---------

Co-authored-by: Eddú Meléndez <eddu.melendez@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants