|
| 1 | +{ |
| 2 | + "name": "Node SQLite Development 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 | + "ghcr.io/devcontainers/features/common-utils:2": { |
| 10 | + "configureZshAsDefaultShell": true |
| 11 | + }, |
| 12 | + "ghcr.io/devcontainers/features/python:1": { |
| 13 | + "version": "3.11" |
| 14 | + } |
| 15 | + }, |
| 16 | + |
| 17 | + // Configure tool-specific properties |
| 18 | + "customizations": { |
| 19 | + "vscode": { |
| 20 | + "extensions": [ |
| 21 | + "dbaeumer.vscode-eslint", |
| 22 | + "esbenp.prettier-vscode", |
| 23 | + "ms-vscode.cpptools", |
| 24 | + "ms-vscode.cpptools-extension-pack", |
| 25 | + "streetsidesoftware.code-spell-checker", |
| 26 | + "wayou.vscode-todo-highlight", |
| 27 | + "gruntfuggly.todo-tree", |
| 28 | + "yzhang.markdown-all-in-one", |
| 29 | + "bierner.markdown-mermaid", |
| 30 | + "usernamehw.errorlens" |
| 31 | + ], |
| 32 | + "settings": { |
| 33 | + "terminal.integrated.defaultProfile.linux": "zsh", |
| 34 | + "editor.formatOnSave": true, |
| 35 | + "editor.codeActionsOnSave": { |
| 36 | + "source.fixAll.eslint": "explicit" |
| 37 | + }, |
| 38 | + "eslint.validate": [ |
| 39 | + "javascript", |
| 40 | + |
| 41 | + "javascriptreact", |
| 42 | + "typescript", |
| 43 | + "typescriptreact" |
| 44 | + ], |
| 45 | + "files.associations": { |
| 46 | + "*.gyp": "python", |
| 47 | + "*.gypi": "python" |
| 48 | + }, |
| 49 | + "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools" |
| 50 | + } |
| 51 | + } |
| 52 | + }, |
| 53 | + |
| 54 | + // Use 'forwardPorts' to make a list of ports inside the container available locally |
| 55 | + "forwardPorts": [], |
| 56 | + |
| 57 | + // Use 'postCreateCommand' to run commands after the container is created |
| 58 | + "postCreateCommand": "bash .devcontainer/post-create.sh", |
| 59 | + |
| 60 | + // Set environment variables |
| 61 | + "containerEnv": { |
| 62 | + "NODE_ENV": "development" |
| 63 | + }, |
| 64 | + |
| 65 | + // Configure mounts |
| 66 | + "mounts": [ |
| 67 | + // Mount npm cache for faster rebuilds |
| 68 | + "source=${localEnv:HOME}/.npm,target=/home/vscode/.npm,type=bind,consistency=cached" |
| 69 | + ], |
| 70 | + |
| 71 | + // Run as non-root user |
| 72 | + "remoteUser": "vscode" |
| 73 | +} |
0 commit comments