Repository navigation
Expand file tree
/
Copy pathdevcontainer.json
More file actions
54 lines (54 loc) · 1.98 KB
/
Copy pathdevcontainer.json
File metadata and controls
54 lines (54 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// DevFlow dev container: pinned Rust toolchain matching rust-toolchain.toml
// (an exact version, never a floating channel; components clippy and rustfmt),
// with cargo registry and workspace target/ caches persisted across rebuilds.
// Base image tag verified against mcr.microsoft.com/v2/devcontainers/rust/tags/list
// (current published bookworm tag as of 2026-07-17) — pin deliberately; never use
// an unversioned floating tag.
{
"name": "DevFlow",
"image": "mcr.microsoft.com/devcontainers/rust:2.0.13-1-bookworm",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true
}
},
"mounts": [
{
"source": "devflow-cargo-registry",
"target": "/usr/local/cargo/registry",
"type": "volume"
},
{
"source": "devflow-cargo-git",
"target": "/usr/local/cargo/git",
"type": "volume"
},
{
"source": "devflow-target-${localWorkspaceFolderBasename}",
"target": "${containerWorkspaceFolder}/target",
"type": "volume"
}
],
// Docker creates fresh named volumes as root; claim writable Cargo volumes for the lifecycle user.
"postCreateCommand": "sudo chown -R \"$(id -u):$(id -g)\" /usr/local/cargo/registry /usr/local/cargo/git \"${containerWorkspaceFolder}/target\" && git config --global --add safe.directory \"${containerWorkspaceFolder}\" && rustup component add clippy rustfmt && cargo build --workspace",
"customizations": {
"vscode": {
"extensions": [
"rust-lang.rust-analyzer",
"vadimcn.vscode-lldb",
"tamasfe.even-better-toml",
"fill-labs.dependi",
"mutantdino.resourcemonitor"
],
"settings": {
"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.allTargets": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true
}
}
},
"remoteUser": "vscode"
}