Hi all, I’m really excited to see the new features...
# general
j
Hi all, I’m really excited to see the new features in 2.15. 🎉. Some questions for the multi-platform support. I’m on a M1 laptop, I’m trying to figure out if/how to build docker image for linux/amd64 platform. I’ve tried with adding
platforms=["anylinux2014_x86_64-cp-310-cp310"]
to pex or use the new
Copy code
docker_environment(
    name="python_bullseye",
    platform="linux_x86_64",
    image="python:3.10.9-slim-bullseye",
    python_bootstrap_search_path=["<PATH>"],
)
but it seems like the docker image it built still in arm architecture. Could someone help me to figure this out?
b
Are you trying to build a
docker_image
target specifically? If so, https://github.com/pantsbuild/pants/issues/17539 is relevant. I put a potential work around in a comment there: setting the following in `pants.toml`:
Copy code
[docker]
env_vars.add = [
    "DOCKER_DEFAULT_PLATFORM=linux/amd64"
]
(NB. that'll force all docker images to be
linux/amd64
.)
j
Yes! It’ll be great to see this coming! 🙏