// @license // Copyright 2022-2026 Matter.js Authors // SPDX-License-Identifier: Apache-2.0 // Dev container notes for developers: // // You do not need to use a dev container with matter.js. Native development should work fine. Further, due to // networking idiosyncrasies, devices running in a dev container may not be discoverable outside the container on macs // and windows. // // For the same reasons as above, the dev container is useful for local testing. Running matter.js in the container // allows it to connect to other components running in docker. // // Using Docker desktop you must set default containers to be dual IPv4/IPv6. On macs the options "Use kernel // networking for UDP" and "Enable host networking" must be enabled. // // Claude Code support: // // This devcontainer includes Claude Code with a network firewall that restricts outbound connections to whitelisted // domains only. This allows running "claude --dangerously-skip-permissions" safely for unattended operation. // See https://code.claude.com/docs/en/devcontainer for details. { "name": "matter.js", "dockerComposeFile": "docker-compose.yml", "service": "devcontainer", "workspaceFolder": "/matter.js", "postCreateCommand": "/bin/bash ./.devcontainer/bin/post-create.sh", "postStartCommand": "/bin/bash ./.devcontainer/bin/post-start.sh", "waitFor": "postStartCommand", "remoteUser": "matter", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { "moby": false, "azureDnsAutoDetection": false, "installDockerBuildx": true, "installDockerComposeSwitch": false, "version": "latest", "dockerDashComposeVersion": "v2" } }, "customizations": { "vscode": { "extensions": [ "anthropic.claude-code", "rioj7.command-variable", "stkb.rewrap", "oxc.oxc-vscode" ], "settings": { "terminal.integrated.defaultProfile.linux": "zsh", "terminal.integrated.profiles.linux": { "bash": { "path": "bash", "icon": "terminal-bash" }, "zsh": { "path": "zsh" } } } } }, "mounts": [ "source=matter-js-npm-${devcontainerId},target=/matter.js/node_modules,type=volume", "source=matter-js-bashhistory-${devcontainerId},target=/home/matter/.commandhistory,type=volume", "source=matter-js-claude-config-${devcontainerId},target=/home/matter/.claude,type=volume", "type=tmpfs,destination=/tmp,tmpfs-mode=1770,tmpfs-size=64m" ], "containerEnv": { //"NODE_OPTIONS": "--max-old-space-size=4096", "CLAUDE_CONFIG_DIR": "/home/matter/.claude" } }