|
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
| 2 | +// README at: https://github.com/devcontainers/templates/tree/main/src/rust |
| 3 | +{ |
| 4 | + "name": "Rust", |
| 5 | + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
| 6 | + "image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04", |
| 7 | + "updateContentCommand": { |
| 8 | + "systemPackages": "sudo apt-get update -y && sudo apt-get install -y pkg-config libssl-dev", |
| 9 | + "rustToolchain": "rustup show", |
| 10 | + "mise": "mise trust && mise install && mkdir -p ~/.config/fish && echo 'mise activate fish --shims | source' >> ~/.config/fish/config.fish" |
| 11 | + }, |
| 12 | + "containerEnv": { |
| 13 | + "CARGO_TARGET_DIR": "/tmp/target" |
| 14 | + }, |
| 15 | + "features": { |
| 16 | + "ghcr.io/devcontainers/features/rust:1": {}, |
| 17 | + "ghcr.io/devcontainers-extra/features/mise:1": {}, |
| 18 | + "ghcr.io/devcontainers-extra/features/fish-apt-get:1": {} |
| 19 | + }, |
| 20 | + "customizations": { |
| 21 | + "vscode": { |
| 22 | + "extensions": [ |
| 23 | + "rust-lang.rust-analyzer", |
| 24 | + "tamasfe.even-better-toml", |
| 25 | + "fill-labs.dependi" |
| 26 | + ], |
| 27 | + "settings": { |
| 28 | + "terminal.integrated.defaultProfile.linux": "fish", |
| 29 | + "terminal.integrated.profiles.linux": { |
| 30 | + "fish": { |
| 31 | + "path": "/usr/bin/fish" |
| 32 | + } |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | + } |
| 37 | + // Use 'mounts' to make the cargo cache persistent in a Docker Volume. |
| 38 | + // "mounts": [ |
| 39 | + // { |
| 40 | + // "source": "devcontainer-cargo-cache-${devcontainerId}", |
| 41 | + // "target": "/usr/local/cargo", |
| 42 | + // "type": "volume" |
| 43 | + // } |
| 44 | + // ] |
| 45 | + // Features to add to the dev container. More info: https://containers.dev/features. |
| 46 | + // "features": {}, |
| 47 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 48 | + // "forwardPorts": [], |
| 49 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 50 | + // "postCreateCommand": "rustc --version", |
| 51 | + // Configure tool-specific properties. |
| 52 | + // "customizations": {}, |
| 53 | + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 54 | + // "remoteUser": "root" |
| 55 | +} |
0 commit comments