Documentation
¶
Overview ¶
Package devcontainer parses the subset of a target repository's devcontainer.json the orchestrator honors when defaulting builds and runs into the repo's dev container: the image, its named cache volumes, and the remote user's home (so toolchain caches resolve where the dev container put them). Like preview.toml, the file is read from the committed tree of the deployed sha, never from a checkout.
Everything else — Dockerfile builds, features, runArgs, containerEnv, lifecycle commands — is deliberately ignored: honoring them faithfully requires the devcontainer CLI, and the goal here is only a warm, matching toolchain for build steps and server processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Image is the container image builds and runs default into.
Image string `json:"image"`
// Mounts are the devcontainer's named-volume mounts (bind mounts are
// dropped — they reference paths personal to the developer's machine).
// Sharing these volumes is what keeps preview builds warm: the dev
// sandbox already populated them.
Mounts []Mount `json:"mounts,omitempty"`
// Home is the remote user's home directory, derived from remoteUser /
// containerUser. Steps run with HOME set to it so toolchains (go, npm)
// resolve their caches onto the mounted volumes.
Home string `json:"home,omitempty"`
}
Config is the resolved subset of devcontainer.json. The zero value (empty Image) means "no usable devcontainer". It round-trips through JSON as part of stored run configs, so field order and tags are part of the contract.