devcontainer

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDevcontainerConfigs

func FindDevcontainerConfigs(dir string) ([]string, error)

FindDevcontainerConfigs searches for devcontainer.json files in the given directory. It looks for: - .devcontainer/devcontainer.json - .devcontainer/*/devcontainer.json (subdirectories)

Types

type Config

type Config struct {
	Image             string   `json:"image"`
	DockerComposeFile []string `json:"-"`
	Service           string   `json:"service"`
	ConfigPath        string   `json:"-"`
}

Config represents a parsed devcontainer.json configuration.

func ParseConfig

func ParseConfig(path string) (*Config, error)

ParseConfig reads and parses a devcontainer.json file. It supports JSONC (JSON with comments) and trailing commas.

func (*Config) GetComposeFiles

func (c *Config) GetComposeFiles() []string

GetComposeFiles returns absolute paths of the compose files.

func (*Config) IsComposeBased

func (c *Config) IsComposeBased() bool

IsComposeBased returns true if the config uses docker-compose.

func (*Config) IsImageBased

func (c *Config) IsImageBased() bool

IsImageBased returns true if the config uses an image directly.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL