Hi, not sure if I'm making a mistake, its a docker...
# general
a
Hi, not sure if I'm making a mistake, its a docker issue, or its pants. When I am using
docker_environment
to create two environments from the same multi platform image it works the first time the image is not downloaded locally, but then fails for the other platform. Build file:
Copy code
docker_environment(
    name = "golang-bookworm",
    image = "golang@sha256:81c97ed10e57e92aa271ef8cb296cb3fb45e510634dcc1e5e76b6239150a1419",
    platform = "linux_x86_64",
)

docker_environment(
    name = "golang-bookworm-arm",
    image = "golang@sha256:81c97ed10e57e92aa271ef8cb296cb3fb45e510634dcc1e5e76b6239150a1419",
    platform = "linux_arm64",
)
Error when using the arm version:
Copy code
IntrinsicError: Failed to create Docker container: DockerResponseServerError { status_code: 404, message: "image with reference golang@sha256:81c97ed10e57e92aa271ef8cb296cb3fb45e510634dcc1e5e76b6239150a1419 was found but its platform (linux/amd64) does not match the specified platform (linux/arm64)" }
w
This could be related to: https://github.com/moby/moby/issues/43188 You could try getting the platform specific SHA by using the command
docker manifest inspect golang@sha256:81c97ed10e57e92aa271ef8cb296cb3fb45e510634dcc1e5e76b6239150a1419
.
a
That did the trick, thanks 🙏
h
Thanks @worried-piano-22913! What was the fix exactly?
🙌 1
a
By running the above command,
docker manifest inspect
on the multiplatform image, you can see the platform specific SHA, and use that for each of the
docker_environment
images
h
Thanks! That’ll help anyone who comes here in the future searching for answers
2