Commit 808f771
committed
Stabilize and automate the dev container build
This commit resolves a series of build and runtime errors to create a stable,
portable, and fully automated dev container environment that works on both
`arm64` and `x86_64` architectures out-of-the-box.
- Stabilize Dockerfile Build:
- Upgrades the base image from `bullseye` to `bookworm`.
- Consolidates all `apt-get` dependencies into a single, correctly ordered
layer, installing necessary tools for cross-compilation
(`gcc-x86-64-linux-gnu`, `libc6-dev-amd64-cross`).
- Fixes `rustup` permission errors by installing the toolchain as `root`
and granting ownership to the `vscode` user.
- Adds `--break-system-packages` to the `pip install` command to comply
with Debian `bookworm`'s package management policies.
- Improve Architecture Portability:
- Makes the `bin/build` and `bin/test` scripts architecture-aware, allowing
them to run seamlessly on both `arm64` and `x86_64` hosts without manual
configuration.
- Fixes a bug that caused inconsistent naming of the shared library (`.so`)
file between build and test runs.
- Fix Container Startup on ARM64:
- Centralizes QEMU and `binfmt` setup within the `Dockerfile` build,
creating an architecture-aware initialization process.
- This allows for the removal of legacy, conflicting setup methods that
caused startup failures on `arm64` hosts:
- Removes the privileged `docker run` command for `qemu-user-static`
from the `postCreate` script.
- Disables the redundant QEMU setup in the `docker-in-docker` feature
by configuring `install-qemu: false` for the feature.1 parent 1d0afd4 commit 808f771
File tree
6 files changed
+82
-37
lines changed- .devcontainer
- bin
6 files changed
+82
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
5 | 19 | | |
6 | | - | |
| 20 | + | |
| 21 | + | |
7 | 22 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 23 | + | |
| 24 | + | |
11 | 25 | | |
12 | | - | |
| 26 | + | |
13 | 27 | | |
14 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
15 | 31 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
29 | 38 | | |
30 | | - | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
7 | 23 | | |
8 | 24 | | |
9 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
7 | 23 | | |
8 | 24 | | |
9 | 25 | | |
| |||
12 | 28 | | |
13 | 29 | | |
14 | 30 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments