feat: Configure devcontainer with `/tmp` volume mount, `vscode` remote user, and post-start script updates. (#29986)

This commit is contained in:
GuanMu 2025-12-22 20:08:04 +08:00 committed by GitHub
parent 585fd1fae0
commit 4d8223d517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -6,6 +6,9 @@
"context": "..", "context": "..",
"dockerfile": "Dockerfile" "dockerfile": "Dockerfile"
}, },
"mounts": [
"source=dify-dev-tmp,target=/tmp,type=volume"
],
"features": { "features": {
"ghcr.io/devcontainers/features/node:1": { "ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true, "nodeGypDependencies": true,
@ -34,19 +37,13 @@
}, },
"postStartCommand": "./.devcontainer/post_start_command.sh", "postStartCommand": "./.devcontainer/post_start_command.sh",
"postCreateCommand": "./.devcontainer/post_create_command.sh" "postCreateCommand": "./.devcontainer/post_create_command.sh"
// Features to add to the dev container. More info: https://containers.dev/features. // Features to add to the dev container. More info: https://containers.dev/features.
// "features": {}, // "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally. // Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [], // "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version", // "postCreateCommand": "python --version",
// Configure tool-specific properties. // Configure tool-specific properties.
// "customizations": {}, // "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
} }

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
WORKSPACE_ROOT=$(pwd) WORKSPACE_ROOT=$(pwd)
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
corepack enable corepack enable
cd web && pnpm install cd web && pnpm install
pipx install uv pipx install uv