https://pantsbuild.org/ logo
#general
Title
# general
j

jolly-kite-53356

02/06/2023, 6:25 AM
Hi to all! I just joined the slack, really nice to know the community here 🙌 I have some questions regarding pants + docker. I’m using M1 Mac, and am tying to build docker image with multi-platform support. I can do this with something like
docker buildx build --push --platform linux/arm64,linux/amd64
, but with pants,
Copy code
[docker]
build_args = [
  "--no-cache=true",
  "--platform=linux/arm64,linux/amd64"
]
the above configuration doesn’t seem work at all, no errors, no effects. I’m wondering is that a configuration error or something else?
b

broad-processor-92400

02/06/2023, 6:46 AM
build_args
refers to the
--build-arg
specifically, not a general set of command line arguments to pass to
build
(confusing), see https://www.pantsbuild.org/docs/reference-docker#build_args. For the specific example of platform, there's https://github.com/pantsbuild/pants/issues/17539
(Although multi-platform builds may require https://github.com/pantsbuild/pants/issues/15199, too)
5 Views