Skip to content

[AI] Add devcontainer configuration#3276

Draft
JanJakes wants to merge 2 commits intotrunkfrom
devcontainers
Draft

[AI] Add devcontainer configuration#3276
JanJakes wants to merge 2 commits intotrunkfrom
devcontainers

Conversation

@JanJakes
Copy link
Member

Summary

  • Adds a devcontainer configuration for VS Code and GitHub Codespaces
  • Node.js 20 base image (matching .nvmrc), Docker-in-Docker for PHP WASM recompilation, GitHub CLI
  • postCreateCommand initializes git submodules, runs npm install, and installs Playwright browsers
  • Pre-configures ESLint, Prettier, and NX Console extensions with format-on-save

Test plan

  • Open the repo in VS Code with the Dev Containers extension and run "Reopen in Container"
  • Verify npm run dev starts and port 5400 is forwarded
  • Verify npx nx test playground-blueprints runs successfully
  • Verify docker is available inside the container (for PHP WASM recompilation)
  • Verify Playwright browsers are installed (npx playwright install --dry-run shows no missing browsers)

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)
Copilot AI review requested due to automatic review settings February 16, 2026 09:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 postCreateCommand to 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",
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"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",

Copilot uses AI. Check for mistakes.
@JanJakes JanJakes changed the title Add devcontainer configuration [AI] Add devcontainer configuration Feb 16, 2026
@JanJakes JanJakes marked this pull request as draft February 16, 2026 10:07
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant