Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
FROM --platform=linux/amd64 mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
Setting the DOCKER_DEFAULT_PLATFORM environment variable in .zshrc
DOCKER_DEFAULT_PLATFORM=linux/amd64
Set runArgs in devcontainer.json
"runArgs": [
"--platform=linux/amd64"
],
But for all of them I receive the following error when building the container:
[183642 ms] Start: Run: docker inspect --type image mcr.microsoft.com/vscode/devcontainers/python:3.11-buster
[185190 ms] Error fetching image details: No manifest found for mcr.microsoft.com/vscode/devcontainers/python:3.11-buster.
[185190 ms] Start: Run: docker pull mcr.microsoft.com/vscode/devcontainers/python:3.11-buster
3.11-buster: Pulling from vscode/devcontainers/python
no matching manifest for linux/arm64/v8 in the manifest list entries
[186436 ms] []
[186436 ms] Error response from daemon: No such image: mcr.microsoft.com/vscode/devcontainers/python:3.11-buster
How can I fix the platform to linux/amd64?
VS Code version: Code - Insiders 1.83.0-insider (03671d332bf6a34782d5adc64086bc8e083a1590, 2023-09-12T15:10:21.088Z)
OS version: Darwin arm64 22.5.0
Modes:
Remote OS version: Linux arm64 5.15.49-linuxkit-pr
Type: Bug
I'm using a MacBook Pro with the M2 processor (
arm64
) but I need to start a devcontainer with anamd64
version of the Python image (buster):Docker image: mcr.microsoft.com/devcontainers/python:0-3.11-buster
This is what I've tried so far:
Add
platform
in the DockerfileSetting the
DOCKER_DEFAULT_PLATFORM
environment variable in.zshrc
Set
runArgs
indevcontainer.json
But for all of them I receive the following error when building the container:
How can I fix the platform to
linux/amd64
?VS Code version: Code - Insiders 1.83.0-insider (03671d332bf6a34782d5adc64086bc8e083a1590, 2023-09-12T15:10:21.088Z) OS version: Darwin arm64 22.5.0 Modes: Remote OS version: Linux arm64 5.15.49-linuxkit-pr
System Info
|Item|Value| |---|---| |CPUs|Apple M2 Pro (10 x 24)| |GPU Status|2d_canvas: enabledcanvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|6, 5, 5| |Memory (System)|16.00GB (0.13GB free)| |Process Argv|--crash-reporter-id eb45ab78-addf-4d40-9ddc-fee46a6775ae| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|Dev Container: Java 17 @ desktop-linux| |OS|Linux arm64 5.15.49-linuxkit-pr| |CPUs|unknown (6 x 0)| |Memory (System)|15.61GB (13.58GB free)| |VM|0%|
Extensions (19)
Extension|Author (truncated)|Version ---|---|--- ginfuru-vscode-jekyll-syntax|gin|0.1.1 jupyter-keymap|ms-|1.1.2 remote-containers|ms-|0.311.0 vscode-eslint|dba|2.4.2 vscode-docker|ms-|1.26.0 java|red|1.22.0 code-spell-checker|str|3.0.1 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30 vscode-boot-dev-pack|vmw|0.2.1 vscode-spring-boot|vmw|1.48.0 vscode-java-debug|vsc|0.54.0 vscode-java-dependency|vsc|0.23.1 vscode-java-pack|vsc|0.25.13 vscode-java-test|vsc|0.39.1 vscode-lombok|vsc|1.1.0 vscode-maven|vsc|0.42.0 vscode-spring-boot-dashboard|vsc|0.13.1 vscode-spring-initializr|vsc|0.11.2A/B Experiments
``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627cf:30244335 vslsvsres303:30308271 pythontb:30258533 pythonptprofiler:30281269 vshan820:30294714 vscod805:30301674 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30404738 py29gd2263:30784851 vsclangdf:30492506 c4g48928:30535728 dsvsc012:30540252 pynewext54:30618038 2i9eh265:30646982 showlangstatbar:30737417 ecj1e332:30687743 pythonfmttext:30716741 fixshowwlkth:30771523 showindicator:30805243 pythongtdpath:30726887 i26e3531:30792625 welcomedialog:30812478 pythonnosmt12:30779711 pythonidxpt:30768918 pythonnoceb:30776497 copilotsettingt:30808721 dsvsc013:30777762 dsvsc014:30777825 diffeditorv2:30786206 pythonlinttypecf:30823782 pythonmpsinfo:30815194 dsvsc015:30821418 pythontestfixt:30826906 pythonfb280951:30830809 ```