Ensure devcontainer uses the platform of the toolchain (#1073)

* Refactor devcontainer into Docker Compose

We need to make the platform explicit (only via the Docker Compose) as the Dockerfile fetches a crosscompiler for x86.

* Add git to dev container
This commit is contained in:
Nelson
2025-12-13 13:02:38 +00:00
committed by GitHub
parent 5e82f602ed
commit d16bc7332f
3 changed files with 15 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
FROM ubuntu:22.04
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y make wget xz-utils && \
apt-get install -y git make wget xz-utils && \
wget -qO- "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz?revision=d0b90559-3960-4e4b-9297-7ddbc3e52783&rev=d0b9055939604e4b92977ddbc3e52783&hash=0074C1529DE90C98726B80ED3EE0776C" | tar -xJ && \
mv gcc-arm-* /usr/local/bin && \
printf 'export PATH=$PATH:%s\n' /usr/local/bin/gcc-arm-*/bin >> ~/.bashrc && \

View File

@@ -1,5 +1,5 @@
{
"build": {
"dockerfile": "Dockerfile"
}
}
"dockerComposeFile": "docker-compose.yml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}"
}

View File

@@ -0,0 +1,10 @@
version: "3.8"
services:
devcontainer:
build:
context: .
dockerfile: Dockerfile
platform: linux/amd64
volumes:
- ../..:/workspaces:cached
command: sleep infinity