mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: improve devcontainer configuration based on review
- 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
This commit is contained in:
parent
62e5d4de63
commit
50179a5f69
2 changed files with 5 additions and 11 deletions
|
|
@ -34,7 +34,4 @@ RUN mkdir -p /pnpm /workspace \
|
|||
&& chown -R $USERNAME:$USERNAME /pnpm /workspace
|
||||
|
||||
# Switch to non-root user
|
||||
USER $USERNAME
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /workspace
|
||||
USER $USERNAME
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
"forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created
|
||||
"postCreateCommand": "pnpm install --frozen-lockfile",
|
||||
"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!'",
|
||||
|
|
@ -49,16 +49,13 @@
|
|||
"mounts": [
|
||||
// Mount pnpm store as a volume for caching
|
||||
"source=pnpm-store,target=/pnpm,type=volume",
|
||||
// Mount node_modules as volumes for better performance
|
||||
"source=node-modules,target=/workspace/node_modules,type=volume",
|
||||
"source=src-node-modules,target=/workspace/src/node_modules,type=volume",
|
||||
"source=webview-ui-node-modules,target=/workspace/webview-ui/node_modules,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",
|
||||
"PATH": "/pnpm:${localEnv:PATH}"
|
||||
"PNPM_HOME": "/pnpm"
|
||||
},
|
||||
|
||||
// Run as non-root user
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue