{ "name": "code-crime", "build": { "dockerfile": "../Dockerfile", "context": ".." }, // The Dockerfile's WORKDIR is /workspace — mount the repo there so // HERDR_CONFIG_PATH=/workspace/.config/herdr/config.toml lands correctly. "workspaceFolder": "/workspace", "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached", // Persist Mistral Vibe config/auth across container rebuilds, matching the // -v vibe_data:/root/.vibe/ mount used in the manual setup. // SSH material is bind-mounted read-only (readonly flag: string mount syntax // supports it; object-form mounts don't — see devcontainers/spec#511) so // git remotes via SSH work in-container without copying private keys in. // Only ~/.ssh/agent-creds is mounted, into a subfolder of the container's // .ssh, leaving in-container keys/config separate from host ones. The // devcontainer spec has no variable-default syntax, so ~/.ssh/agent-creds // is the fixed default path; the host directory must exist (mkdir it if // not) and the container must be recreated to refresh the mount. "mounts": [ "source=vibe_data,target=/root/.vibe,type=volume", "source=${localEnv:HOME}/.ssh/agent-creds,target=/root/.ssh/agent-creds,type=bind,readonly" ], // The Dockerfile sets an ENTRYPOINT; the dev container runner overrides it, // but keep the container alive-friendly anyway. "overrideCommand": true, // Memory cap 3g; --memory-swap is RAM+swap, so swap = 5g - 3g = 2g. "runArgs": ["--init", "--memory=3g", "--memory-swap=5g"], "remoteUser": "root", "containerEnv": { "DEVCONTAINER": "true" }, // The image uses a minimal Rust profile; dev needs the components VS Code drives. "postCreateCommand": "rustup component add rust-analyzer clippy rustfmt", "customizations": { "vscode": { "extensions": [ "rust-lang.rust-analyzer", "vadimcn.vscode-lldb", "tamasfe.even-better-toml" ] } } }