|
| 1 | +{ |
| 2 | + "name": "Roo Code Dev Container", |
| 3 | + "dockerFile": "Dockerfile", |
| 4 | + |
| 5 | + // Features to add to the dev container |
| 6 | + "features": { |
| 7 | + "ghcr.io/devcontainers/features/git:1": {}, |
| 8 | + "ghcr.io/devcontainers/features/github-cli:1": {} |
| 9 | + }, |
| 10 | + |
| 11 | + // Configure tool-specific properties |
| 12 | + "customizations": { |
| 13 | + "vscode": { |
| 14 | + // Add the extensions from .vscode/extensions.json |
| 15 | + "extensions": [ |
| 16 | + "dbaeumer.vscode-eslint", |
| 17 | + "esbenp.prettier-vscode", |
| 18 | + "csstools.postcss", |
| 19 | + "bradlc.vscode-tailwindcss", |
| 20 | + "connor4312.esbuild-problem-matchers", |
| 21 | + "yoavbls.pretty-ts-errors" |
| 22 | + ], |
| 23 | + "settings": { |
| 24 | + "terminal.integrated.defaultProfile.linux": "bash", |
| 25 | + "terminal.integrated.profiles.linux": { |
| 26 | + "bash": { |
| 27 | + "path": "/bin/bash", |
| 28 | + "icon": "terminal-bash" |
| 29 | + } |
| 30 | + }, |
| 31 | + "editor.formatOnSave": true, |
| 32 | + "editor.defaultFormatter": "esbenp.prettier-vscode", |
| 33 | + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], |
| 34 | + "typescript.tsdk": "node_modules/typescript/lib" |
| 35 | + } |
| 36 | + } |
| 37 | + }, |
| 38 | + |
| 39 | + // Use 'forwardPorts' to make a list of ports inside the container available locally |
| 40 | + "forwardPorts": [], |
| 41 | + |
| 42 | + // Use 'postCreateCommand' to run commands after the container is created |
| 43 | + "postCreateCommand": "pnpm install --frozen-lockfile", |
| 44 | + |
| 45 | + // Use 'postStartCommand' to run commands after the container starts |
| 46 | + "postStartCommand": "echo '🎉 Dev container is ready!'", |
| 47 | + |
| 48 | + // Configure mounts for better performance and caching |
| 49 | + "mounts": [ |
| 50 | + // Mount pnpm store as a volume for caching |
| 51 | + "source=pnpm-store,target=/pnpm,type=volume", |
| 52 | + // Mount node_modules as volumes for better performance |
| 53 | + "source=node-modules,target=/workspace/node_modules,type=volume", |
| 54 | + "source=src-node-modules,target=/workspace/src/node_modules,type=volume", |
| 55 | + "source=webview-ui-node-modules,target=/workspace/webview-ui/node_modules,type=volume" |
| 56 | + ], |
| 57 | + |
| 58 | + // Environment variables |
| 59 | + "containerEnv": { |
| 60 | + "PNPM_HOME": "/pnpm", |
| 61 | + "PATH": "/pnpm:${localEnv:PATH}" |
| 62 | + }, |
| 63 | + |
| 64 | + // Run as non-root user |
| 65 | + "remoteUser": "node", |
| 66 | + |
| 67 | + // Uncomment to connect as root instead |
| 68 | + // "remoteUser": "root", |
| 69 | + |
| 70 | + // Additional options |
| 71 | + "updateRemoteUserUID": true, |
| 72 | + "shutdownAction": "stopContainer" |
| 73 | +} |
0 commit comments