devcontainer

package
v0.42.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package devcontainer decorates containers used as devcontainers.

Index

Constants

View Source
const (
	CodespaceNameLabelName    = "lxkns.codespace.name"
	DevContainerNameLabelName = "lxkns.devcontainer.name"
)
View Source
const (
	DevcontainerConfigfileLabelName  = "devcontainer.config_file"
	DevcontainerLocalfolderLabelName = "devcontainer.local_folder"
	DevcontainerMetadataLabelName    = "devcontainer.metadata"
)

Variables

This section is empty.

Functions

func Decorate

func Decorate(engines []*model.ContainerEngine, _ map[string]string)

Decorate all devcontainers, differentiating between “standalone” devcontainers and devcontainers in codespaces.

Types

type CodespaceContainerEnv

type CodespaceContainerEnv struct {
	Codespaces     string `json:"CODESPACES"`     // "true"; yes, it's a string, not a because it's an env var.
	RepositoryName string `json:"RepositoryName"` // actually the codespace name, eh?!
}

CodespaceContainerEnv is our specialized view on a container environment definition with “magic” env variables that tell us more about a codespace.

type ConfigBlock

type ConfigBlock struct {
	ContainerEnv CodespaceContainerEnv `json:"containerEnv"`
}

ConfigBlock is our limited view on a configuration block, where we are solely interested in the presence of a “containerEnv” field that hopefully contains an object with “magic” environment variable fields.

type Metadata

type Metadata []ConfigBlock

Metadata for a devcontainer (including codespace) consists of a sequence of configuration blocks.

Jump to

Keyboard shortcuts

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