Files

64 lines
2.6 KiB
JSON
Raw Permalink Normal View History

// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2023-11-15 13:33:21 +00:00
// https://github.com/devcontainers/images/blob/v0.3.24/src/javascript-node/.devcontainer/devcontainer.json
{
"name": "Node.js",
2023-11-15 13:33:21 +00:00
"image": "mcr.microsoft.com/devcontainers/javascript-node:20-bookworm",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"cweijan.vscode-database-client2",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"deepscan.vscode-deepscan",
"rangav.vscode-thunder-client",
2023-03-29 14:31:58 +00:00
"SonarSource.sonarlint-vscode",
2023-11-03 15:17:17 +00:00
"unifiedjs.vscode-mdx",
"ZihanLi.at-helper"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2023-08-16 06:22:52 +08:00
"forwardPorts": [1200, 3000],
"portsAttributes": {
"1200": {
"label": "app port",
2022-11-16 14:39:46 +00:00
"onAutoForward": "notify"
},
2023-08-16 06:22:52 +08:00
"3000": {
"label": "docs port",
2022-11-16 14:39:46 +00:00
"onAutoForward": "notify"
}
},
2023-01-12 06:52:37 -11:00
"onCreateCommand": "sudo apt-get update && export DEBIAN_FRONTEND=noninteractive && sudo apt-get -y install --no-install-recommends ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 wget xdg-utils redis-server && sudo apt-get autoremove -y && sudo apt-get clean -y && sudo rm -rf /var/lib/apt/lists/*",
2022-11-16 14:39:46 +00:00
2023-08-16 06:22:52 +08:00
"updateContentCommand": "pnpm i && pnpm i -C website && pnpm rb",
2022-11-16 14:39:46 +00:00
// Use 'postCreateCommand' to run commands after the container is created.
2023-08-16 06:22:52 +08:00
"postCreateCommand": "pnpm i && pnpm i -C website && pnpm rb",
2022-11-16 14:39:46 +00:00
// Disable auto start dev env since codespaces sometimes fails to attach to the terminal
// "postAttachCommand": {
2023-05-05 09:58:29 -06:00
// "app": "pnpm i",
2023-08-16 06:22:52 +08:00
// // "docs": "pnpm -C website start"
2022-11-16 14:39:46 +00:00
// },
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
2022-11-16 14:39:46 +00:00
"ghcr.io/devcontainers/features/docker-in-docker": {
"version": "latest"
},
"ghcr.io/devcontainers/features/github-cli": {
"version": "latest"
}
}
}