|
2 | 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/rust
|
3 | 3 | {
|
4 | 4 | "name": "Rust",
|
5 |
| - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
6 |
| - "image": "mcr.microsoft.com/devcontainers/rust:latest", |
| 5 | + "build": { |
| 6 | + "dockerfile": "Dockerfile" |
| 7 | + }, |
7 | 8 | "features": {
|
8 |
| - // add `just` for running scripts |
9 |
| - "ghcr.io/guiyomh/features/just:0": { |
| 9 | + "ghcr.io/devcontainers/features/sshd:1": {}, |
| 10 | + "ghcr.io/devcontainers/features/node:1": {}, |
| 11 | + "ghcr.io/devcontainers/features/github-cli:1": { |
10 | 12 | "version": "latest"
|
11 | 13 | },
|
12 |
| - // add `cargo-binstall` for installing other tools. |
13 |
| - "ghcr.io/lee-orr/rusty-dev-containers/cargo-binstall:0": { |
14 |
| - "version": "latest" |
15 |
| - } |
| 14 | + "ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {} |
16 | 15 | },
|
17 | 16 | // Configure tool-specific properties.
|
18 | 17 | "customizations": {
|
|
27 | 26 | ]
|
28 | 27 | }
|
29 | 28 | },
|
| 29 | + "containerEnv": { |
| 30 | + "CLAUDE_CONFIG_DIR": "/home/vscode/.claude", |
| 31 | + "npm_config_store_dir": "/home/vscode/.local/share/pnpm" |
| 32 | + }, |
30 | 33 |
|
31 |
| - // Use 'mounts' to make the cargo cache persistent in a Docker Volume. |
32 |
| - // "mounts": [ |
33 |
| - // { |
34 |
| - // "source": "devcontainer-cargo-cache-${devcontainerId}", |
35 |
| - // "target": "/usr/local/cargo", |
36 |
| - // "type": "volume" |
37 |
| - // } |
38 |
| - // ] |
| 34 | + "mounts": [ |
| 35 | + "source=${localEnv:HOME}/.claude,target=/home/vscode/.claude,type=bind", |
| 36 | + "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,readonly", |
| 37 | + "source=target,target=${containerWorkspaceFolder}/target,type=volume" |
| 38 | + ], |
39 | 39 |
|
40 | 40 | // Features to add to the dev container. More info: https://containers.dev/features.
|
41 | 41 | // "features": {},
|
|
44 | 44 | // "forwardPorts": [],
|
45 | 45 |
|
46 | 46 | // Use 'postCreateCommand' to run commands after the container is created.
|
47 |
| - "postCreateCommand": "just init" |
48 |
| - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
49 |
| - // "remoteUser": "root" |
| 47 | + "postCreateCommand": "/bin/bash .devcontainer/postCreateCommand.sh" |
50 | 48 | }
|
0 commit comments