Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicts between architecture of image present on system when building PEX with docker_environment #21323

Open
ntr-switchdin opened this issue Aug 20, 2024 · 0 comments
Labels

Comments

@ntr-switchdin
Copy link

Describe the bug
Building a pex inside a container with the same image tag as one present on the host sytem causes the packaging to fail with an InstrinsicError

Pants version
2.21

OS

ProductName:		macOS
ProductVersion:		14.6.1
BuildVersion:		23G93

Additional info

local_environment(
  name="linux",
  compatible_platforms=["linux_x86_64"],
  fallback_environment="container",
)

docker_environment(
    name="container",
    platform="linux_x86_64",
    image="python:3.11-slim-buster",
)
IntrinsicError: Failed to create Docker container: DockerResponseServerError { status_code: 404, message: "image with reference sha256:12cacc23b6dec78ca7b056d56e3de48252669ed49fffd95ed36adbf9dfe3cec0 was found but does not match the specified platform: wanted linux/amd64, actual: linux/arm64/v8" }

possibly could be fixed by specifying the platform of the docker_environment in the command running the build?
i'm working around this currently by specifying the platform image instead of the generic python one:

    image="amd64/python:3.11-slim-buster",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant