Conversation
Single devcontainer setup with: - Node.js 20 base image (matching .nvmrc) - Docker-in-Docker for PHP WASM recompilation - GitHub CLI - Playwright browsers (Chromium, Firefox) installed via postCreateCommand - Git submodules initialization and npm install on create - VS Code extensions: ESLint, Prettier, NX Console - Port forwarding for dev server (5400) and docs (3000)
There was a problem hiding this comment.
Pull request overview
This PR adds development container configuration to enable consistent development environments across VS Code and GitHub Codespaces. The configuration uses Node.js 20 (matching the project's .nvmrc), includes Docker-in-Docker for PHP WASM recompilation, and automates environment setup through post-creation commands.
Changes:
- Adds devcontainer configuration with Node.js 20 base image and required features (Docker-in-Docker, GitHub CLI)
- Configures automated setup via
postCreateCommandto initialize submodules, install dependencies, and set up Playwright browsers - Pre-configures VS Code extensions (ESLint, Prettier, NX Console) with format-on-save enabled
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "ghcr.io/devcontainers/features/docker-in-docker:2": {}, | ||
| "ghcr.io/devcontainers/features/github-cli:1": {} | ||
| }, | ||
| "postCreateCommand": "git submodule update --init --recursive && npm install && npx playwright install --with-deps chromium firefox", |
There was a problem hiding this comment.
The postCreateCommand chains multiple commands with &&, which means if any command fails, subsequent commands won't execute. Consider using a shell script for better error handling and logging, or split into separate lifecycle commands like postCreateCommand and postStartCommand to handle different phases of setup.
| "postCreateCommand": "git submodule update --init --recursive && npm install && npx playwright install --with-deps chromium firefox", | |
| "postCreateCommand": "git submodule update --init --recursive", | |
| "postStartCommand": "npm install", | |
| "postAttachCommand": "npx playwright install --with-deps chromium firefox", |
The javascript-node:20 base image now uses Debian Trixie, where moby-cli packages are unavailable. Set moby: false to install Docker CE directly instead.
Summary
.nvmrc), Docker-in-Docker for PHP WASM recompilation, GitHub CLIpostCreateCommandinitializes git submodules, runsnpm install, and installs Playwright browsersTest plan
npm run devstarts and port 5400 is forwardednpx nx test playground-blueprintsruns successfullydockeris available inside the container (for PHP WASM recompilation)npx playwright install --dry-runshows no missing browsers)