Help us shape the future of Go! Take the 2026 Go Developer Survey

devcontainer

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MPL-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFilesLabel                = "com.docker.compose.project.config_files"
	FeaturesBuildOverrideFilePrefix = "docker-compose.devcontainer.build"
	FeaturesStartOverrideFilePrefix = "docker-compose.devcontainer.containerFeatures"
)
View Source
const (
	DevsyExtraEnvVar            = "DEVSY"
	RemoteContainersExtraEnvVar = "REMOTE_CONTAINERS"

	DefaultEntrypoint = `` /* 174-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func GetContainerEntrypointAndArgs

func GetContainerEntrypointAndArgs(
	mergedConfig *config.MergedDevContainerConfig,
	imageDetails *config.ImageDetails,
) (string, []string)

func GetRunnerIDFromWorkspace

func GetRunnerIDFromWorkspace(workspace *provider2.Workspace) string

func GetStartScript

func GetStartScript(mergedConfig *config.MergedDevContainerConfig) string

Types

type DeleteOptions added in v1.1.0

type DeleteOptions struct {
	RemoveVolumes bool
}

type GetWorkspaceConfigResult

type GetWorkspaceConfigResult struct {
	IsImage         bool     `json:"isImage"`
	IsGitRepository bool     `json:"isGitRepository"`
	IsLocal         bool     `json:"isLocal"`
	ConfigPaths     []string `json:"configPaths"`
}

func FindDevcontainerFiles

func FindDevcontainerFiles(
	ctx context.Context,
	rawSource, tmpDirPath string,
	maxDepth int,
	strictHostKeyChecking bool,
) (*GetWorkspaceConfigResult, error)

func FindFilesInLocalDir

func FindFilesInLocalDir(
	rawSource string,
	maxDepth int,
) (*GetWorkspaceConfigResult, error)

type Runner

type Runner interface {
	Up(ctx context.Context, options UpOptions, timeout time.Duration) (*config.Result, error)

	Build(ctx context.Context, options provider2.BuildOptions) (string, error)

	Find(ctx context.Context) (*config.ContainerDetails, error)

	Command(
		ctx context.Context,
		user string,
		command string,
		stdin io.Reader,
		stdout io.Writer,
		stderr io.Writer,
	) error

	Stop(ctx context.Context) error

	Delete(ctx context.Context, options DeleteOptions) error

	Logs(ctx context.Context, writer io.Writer) error
}

func NewRunner

func NewRunner(
	agentPath, agentDownloadURL string,
	workspaceConfig *provider2.AgentWorkspaceInfo,
) (Runner, error)

type UpOptions

type UpOptions struct {
	provider2.CLIOptions

	NoBuild       bool
	ForceBuild    bool
	RegistryCache string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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