Environment
- Host: macOS (Apple Silicon M1)
- Container Engine: Podman (via podman-machine)
- Extension: VS Code Dev Containers
- Target Image: A private registry image with Poetry
Problem
When I try to reopen my repository using Dev Containers: Rebuild Without Cache and Reopen in Container, the process fails immediately during the image pull/resolution phase:
[2025-11-17T22:33:38.816Z] Start: Run: podman pull .../poetry:3.10
[2025-11-17T22:33:38.894Z] Trying to pull .../poetry:3.10...
[2025-11-17T22:33:39.716Z] Error: unable to copy from source docker://.../poetry:3.10: choosing an image from manifest list docker://.../poetry:3.10: no image found in image index for architecture "arm64", variant "v8", OS "linux"
VS Code defaults to requesting an arm64 image because of my host machine, but the registry only has an amd64 version.
I see the same behaviour when I try to pull it manually in the terminal:
# Fails
podman pull .../poetry:3.10
It is resolved when I explicit add the platform flag:
# Works
podman pull --platform linux/amd64 .../poetry:3.10
Workaround
Currently, I have to perform two steps to get this to work:
- Manually pre-pull the image in the terminal:
podman pull --platform linux/amd64 .../poetry:3.10 - Configure
devcontainer.jsonwith explicit build and run arguments:
{
"name": "My Project",
"build": {
"context": "..",
"dockerfile": "Dockerfile",
"options": ["--platform=linux/amd64"]
},
"runArgs": ["--platform=linux/amd64"]
}
Question
How to force DevContainers to use --platform linux/amd64 by default, without a need of modifying devcontainer.json and pre-pulling the images?
Related threads I have checked: