As it is right now, it's possible to docker build
an image using the community.docker collection:
(Example from documentation)
- name: Build an image and push it to a private repo
community.docker.docker_image:
build:
path: ./sinatra
name: registry.ansible.com/chouseknecht/sinatra
tag: v1
push: yes
source: build
My question is simple. According to their documentation, the platform
field only seems to allow for one architecture:
Platform in the format
os[/arch[/variant]]
.
(Notice "platform" and not "platforms" and that type is "string" and not a list of strings)
Is it possible to multiarch build (for example, an amd64
and arm
) using the community.docker collection? Of course, I can use shell/command instead using something like:
- name: Multiarch build
shell: |
docker buildx build --platform amd64,arm --push -t myimage .
But is it possible using what's available now within the collection?