Documentation
¶
Overview ¶
Package devcontainer parses devcontainer.json files and resolves the container image, mounts, environment, and post-create commands needed to spin up an isolated development shell.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Name string `json:"name"`
Image string `json:"image"`
WorkspaceFolder string `json:"workspaceFolder"`
ContainerEnv map[string]string `json:"containerEnv"`
RemoteUser string `json:"remoteUser"`
PostCreateCommand interface{} `json:"postCreateCommand"` // string or []string
Mounts []interface{} `json:"mounts"` // string or object
ForwardPorts []int `json:"forwardPorts"`
Features map[string]interface{} `json:"features"`
}
Config represents the subset of the devcontainer.json spec that devx supports. See https://containers.dev/implementors/json_reference/
func Load ¶
Load reads and parses a devcontainer.json file. It searches the standard locations: .devcontainer/devcontainer.json, .devcontainer.json, and .devcontainer/<name>/devcontainer.json.
func (*Config) PostCreateCmd ¶
PostCreateCmd returns the post-create command as a single string.
Click to show internal directories.
Click to hide internal directories.