|
1 | 1 | { |
2 | 2 | "name": "HTML Dev Container", |
3 | | - "image": "mcr.microsoft.com/devcontainers/base:alpine", // changed image for compatibility |
4 | | - "remoteUser": "vscode", |
| 3 | + "image": "mcr.microsoft.com/devcontainers/javascript-node:24-trixie", |
| 4 | + "features": { |
| 5 | + "ghcr.io/devcontainers/features/github-cli:1": { |
| 6 | + "installDirectlyFromGitHubRelease": true, |
| 7 | + "version": "latest" |
| 8 | + }, |
| 9 | + // Using a single feature for Node.js for simplicity |
| 10 | + "ghcr.io/devcontainers/features/node:1": { |
| 11 | + "nodeGypDependencies": true, |
| 12 | + "version": "24" // Aligned with base image |
| 13 | + }, |
| 14 | + "ghcr.io/devcontainers/features/git:1": { |
| 15 | + "ppa": true, |
| 16 | + "version": "latest" |
| 17 | + } |
| 18 | + }, |
| 19 | + |
5 | 20 | "customizations": { |
6 | 21 | "vscode": { |
7 | 22 | "extensions": [ |
| 23 | + // Core Development |
| 24 | + "dbaeumer.vscode-eslint", |
| 25 | + |
| 26 | + // GitHub extensions |
8 | 27 | "GitHub.copilot", |
9 | 28 | "GitHub.copilot-chat", |
10 | | - "github.vscode-github-actions", |
| 29 | + |
| 30 | + // TypeScript/Node support |
| 31 | + "christian-kohler.npm-intellisense", |
11 | 32 | "ritwickdey.LiveServer", |
12 | | - "ecmel.vscode-html-css" // Added to boost HTML and CSS IntelliSense |
| 33 | + "ecmel.vscode-html-css", |
| 34 | + |
| 35 | + // Keep minimal formatting support |
| 36 | + "esbenp.prettier-vscode" |
13 | 37 | ] |
14 | 38 | } |
| 39 | + }, |
| 40 | + |
| 41 | + "postCreateCommand": "npm install -g npm@latest typescript@latest eslint@latest && npm ci", |
| 42 | + "shutdownAction": "none", |
| 43 | + |
| 44 | + // Forward necessary ports |
| 45 | + "forwardPorts": [5173], |
| 46 | + "portsAttributes": { |
| 47 | + "5173": { |
| 48 | + "label": "Dev Server", |
| 49 | + "onAutoForward": "notify" |
| 50 | + } |
15 | 51 | } |
16 | 52 | } |
0 commit comments