mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
- Fix PATH handling to avoid host PATH injection - Configure pnpm store directory to use mounted volume - Remove redundant node_modules volume mounts - Remove WORKDIR directive to use Dev Container defaults
70 lines
2 KiB
JSON
70 lines
2 KiB
JSON
{
|
|
"name": "Roo Code Dev Container",
|
|
"dockerFile": "Dockerfile",
|
|
|
|
// Features to add to the dev container
|
|
"features": {
|
|
"ghcr.io/devcontainers/features/git:1": {},
|
|
"ghcr.io/devcontainers/features/github-cli:1": {}
|
|
},
|
|
|
|
// Configure tool-specific properties
|
|
"customizations": {
|
|
"vscode": {
|
|
// Add the extensions from .vscode/extensions.json
|
|
"extensions": [
|
|
"dbaeumer.vscode-eslint",
|
|
"esbenp.prettier-vscode",
|
|
"csstools.postcss",
|
|
"bradlc.vscode-tailwindcss",
|
|
"connor4312.esbuild-problem-matchers",
|
|
"yoavbls.pretty-ts-errors"
|
|
],
|
|
"settings": {
|
|
"terminal.integrated.defaultProfile.linux": "bash",
|
|
"terminal.integrated.profiles.linux": {
|
|
"bash": {
|
|
"path": "/bin/bash",
|
|
"icon": "terminal-bash"
|
|
}
|
|
},
|
|
"editor.formatOnSave": true,
|
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
|
|
"typescript.tsdk": "node_modules/typescript/lib"
|
|
}
|
|
}
|
|
},
|
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally
|
|
"forwardPorts": [],
|
|
|
|
// Use 'postCreateCommand' to run commands after the container is created
|
|
"postCreateCommand": "pnpm config set store-dir /pnpm/store && pnpm install --frozen-lockfile",
|
|
|
|
// Use 'postStartCommand' to run commands after the container starts
|
|
"postStartCommand": "echo '🎉 Dev container is ready!'",
|
|
|
|
// Configure mounts for better performance and caching
|
|
"mounts": [
|
|
// Mount pnpm store as a volume for caching
|
|
"source=pnpm-store,target=/pnpm,type=volume",
|
|
// Mount root node_modules as volume for better performance
|
|
"source=node-modules,target=/workspace/node_modules,type=volume"
|
|
],
|
|
|
|
// Environment variables
|
|
"containerEnv": {
|
|
"PNPM_HOME": "/pnpm"
|
|
},
|
|
|
|
// Run as non-root user
|
|
"remoteUser": "node",
|
|
|
|
// Uncomment to connect as root instead
|
|
// "remoteUser": "root",
|
|
|
|
// Additional options
|
|
"updateRemoteUserUID": true,
|
|
"shutdownAction": "stopContainer"
|
|
}
|