File tree 2 files changed +47
-0
lines changed
2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " Development container for STM32" ,
3
+ "build" : {
4
+ "dockerfile" : " Dockerfile"
5
+ },
6
+ "workspaceFolder" : " /workspace" ,
7
+ "customizations" : {
8
+ "vscode" : {
9
+ "extensions" : [
10
+ " ms-vscode.cmake-tools" ,
11
+ " ms-vscode.cpptools"
12
+ ]
13
+ }
14
+ },
15
+ "mounts" : [
16
+ " source=${localWorkspaceFolder},target=/workspace,type=bind"
17
+ ],
18
+ "postCreateCommand" : " echo 'Dev environment ready!'"
19
+ }
Original file line number Diff line number Diff line change
1
+ # Use a lightweight base image
2
+ FROM ubuntu:20.04
3
+
4
+ # Set environment variables for non-interactive installation
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Update and install required packages
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ build-essential \
10
+ software-properties-common \
11
+ wget \
12
+ git \
13
+ && apt-get clean \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Download and install arm-none-eabi-gcc
17
+ RUN wget -qO- https://developer.arm.com/-/media/Files/downloads/gnu-rm/12.2.rel1/gcc-arm-none-eabi-12.2.rel1-x86_64-linux.tar.bz2 \
18
+ | tar -xj -C /opt/ \
19
+ && ln -s /opt/gcc-arm-none-eabi-12.2.rel1/bin/* /usr/local/bin/
20
+
21
+ # Verify installation
22
+ RUN arm-none-eabi-gcc --version
23
+
24
+ # Set the working directory inside the container
25
+ WORKDIR /workspace
26
+
27
+ # Default command for the container
28
+ CMD ["bash" ]
You can’t perform that action at this time.
0 commit comments