Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'platform' option to build options in docker_image #22

Closed
geerlingguy opened this issue May 28, 2020 · 4 comments · Fixed by #54
Closed

Add 'platform' option to build options in docker_image #22

geerlingguy opened this issue May 28, 2020 · 4 comments · Fixed by #54

Comments

@geerlingguy
Copy link

SUMMARY

I need to support multi-arch builds for some of my Docker images (e.g. support amd64 and arm64), and doing so requires running docker build with the --platform argument. It seems the docker_image module doesn't support that argument right now, so if I want to do this I have to use command:

- command: docker build --platform arm64 --pull -t geerlingguy/my-image:latest-arm64 .
ISSUE TYPE
  • Feature Idea
COMPONENT NAME

docker_image

ADDITIONAL INFORMATION

Related issue: geerlingguy/drupal-container#24

@ansibullbot
Copy link

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@felixfontein
Copy link
Collaborator

The build() function has support for platform: https://docker-py.readthedocs.io/en/stable/api.html#docker.api.build.BuildApiMixin.build

So it should be relatively straightforward to implement.

@felixfontein felixfontein transferred this issue from ansible-collections/community.general Nov 1, 2020
@felixfontein
Copy link
Collaborator

resolved_by_pr #54

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 a pull request may close this issue.

3 participants