Files
devvm/internal/devcontainer
w3cjandClaude Opus 5.5 3da0d6b0a6 feat(devcontainer): a project's devcontainer.json as input for new VMs
A new VM gets what the folder's .devcontainer/devcontainer.json (or .devcontainer.json) says, on every backend: image as --from (only an image its registry gives anyone, asked anonymously, pinned to that digest, never a registry on this machine or its network), features devvm has layers for (docker-in-docker as the docker layer, node, python, rust, go), forwardPorts as far as the user's ports allow, containerEnv and remoteEnv in the VM's environment, onCreate/updateContent/postCreate commands once and postStartCommand at each start, in the VM as its user. --no-devcontainer skips it; the command line wins. Later launches only warn when the file changed.

Nothing from it runs on or reaches the host: initializeCommand never runs, ${localEnv} and the host-folder variables are refused, builds, Compose and docker-outside-of-docker are refused, mounts, runArgs and privileged ignored. The file is read through os.Root, without blocking, at most 1 MiB. A docker layer only the file asks for still asks about network policy on Docker.

Reviewed with the security-audit skill (FuzzParse, design note); e2e: project 69/0, docker linux 135/0, smolvm 131/0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 04:33:54 -07:00
..