Skip to content

Commit 0cbde32

Browse files
committed
Modernize devcontainer configuration
Updates: - Ubuntu 22.04 LTS (jammy) instead of 20.04 (focal) - Modern devcontainers base image - Install all cross-compilation toolchains: * gcc-multilib/g++-multilib (x86 32-bit) * gcc-arm-linux-gnueabi (ARM32) * gcc-aarch64-linux-gnu (ARM64) * gcc-riscv64-linux-gnu (RISC-V) - Install qemu-user for emulation testing - Install Python 3 for build scripts - Updated settings format (customizations instead of deprecated settings) - Fixed deprecated terminal.integrated.shell.linux setting - Added postCreateCommand to verify environment - Improved container name and comments
1 parent 1a38446 commit 0cbde32

File tree

2 files changed

+38
-22
lines changed

2 files changed

+38
-22
lines changed

.devcontainer/Dockerfile

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/ubuntu/.devcontainer/base.Dockerfile
1+
# stackman development container
2+
# Includes cross-compilation toolchains for all supported platforms
23

3-
# [Choice] Ubuntu version: bionic, focal
4-
ARG VARIANT="focal"
5-
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
4+
ARG VARIANT="jammy"
5+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-${VARIANT}
66

7-
# [Optional] Uncomment this section to install additional OS packages.
7+
# Install build tools and cross-compilation toolchains
88
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9-
&& apt-get -y install --no-install-recommends build-essential
10-
11-
9+
&& apt-get -y install --no-install-recommends \
10+
build-essential \
11+
gcc-multilib \
12+
g++-multilib \
13+
gcc-arm-linux-gnueabi \
14+
g++-arm-linux-gnueabi \
15+
gcc-aarch64-linux-gnu \
16+
g++-aarch64-linux-gnu \
17+
gcc-riscv64-linux-gnu \
18+
g++-riscv64-linux-gnu \
19+
qemu-user \
20+
python3 \
21+
python3-pip \
22+
&& apt-get autoremove -y \
23+
&& apt-get clean -y \
24+
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/ubuntu
1+
// For format details, see https://aka.ms/devcontainer.json
32
{
4-
"name": "Ubuntu",
3+
"name": "stackman Development",
54
"build": {
65
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick an Ubuntu version: focal, bionic
8-
"args": { "VARIANT": "focal" }
6+
"args": {
7+
"VARIANT": "jammy" // Ubuntu 22.04 LTS
8+
}
99
},
1010

1111
// Set *default* container specific settings.json values on container create.
12-
"settings": {
13-
"terminal.integrated.shell.linux": "/bin/bash"
12+
"customizations": {
13+
"vscode": {
14+
"settings": {
15+
"terminal.integrated.defaultProfile.linux": "bash"
16+
},
17+
"extensions": [
18+
"ms-vscode.cpptools",
19+
"ms-vscode.cpptools-extension-pack"
20+
]
21+
}
1422
},
1523

16-
// Add the IDs of extensions you want installed when the container is created.
17-
"extensions": [
18-
"ms-vscode.cpptools"
19-
],
20-
2124
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2225
// "forwardPorts": [],
2326

2427
// Use 'postCreateCommand' to run commands after the container is created.
25-
// "postCreateCommand": "uname -a",
28+
"postCreateCommand": "make --version && gcc --version && make abiname",
2629

27-
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
30+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2831
"remoteUser": "vscode"
2932
}

0 commit comments

Comments
 (0)