podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

Add multi-platform build support

Open ebekebe opened this issue 3 years ago • 0 comments

We are currently evaluating podman-compose not only as a means for development, but also to build containers in CI. We need to build multi-platform images (linux/arm64 and linux/amd64), which is supported by podman with the --platform or --arch options. This option is not yet exposed by podman-compose.

I acknowledge that docker-compose does not support this either. However, in the docker world there is docker buildx bake which allows building multi-platform images from a compose file. I am not aware of tooling for podman/buildah, that builds multi-platform images for compose files. I also feel that it is the right place to add support here rather than providing some extra tool.

This PR adds a new option --platform which enables the use of compose files as templates for building multi-platform images. In addition, it adds a --all-platforms options to podman-compose push.

Since --platform is more specific and maps better to the manifest spec than --arch, we only need --platform.

ebekebe avatar Jul 13 '22 08:07 ebekebe