Skip to content

docker backend doesn't use buildx for multi-platform #19994

Open
@mark-thm

Description

@mark-thm

Describe the bug
Docker backend runs docker build rather than docker buildx build for multi-platform builds specified with build_platform set to a list. Single valued lists for build_platform will build correctly, but fail to produce a multi-architecture output image.

Pants version
2.18.0a0 (verified bug still present on mainline, source linked below)

OS
MacOS

Additional info
Docker version 24.0.6, build ed223bc

Using docker build vs docker buildx build:

args = [self.path, "build", *extra_args]

Experimenting with docker build directly:

$ docker build --platform=linux/amd64,linux/arm64 .
[+] Building 0.0s (0/0)                                                                                                  docker:desktop-linux
ERROR: Multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions