Versions in this module Expand all Collapse all v0 v0.19.0 May 27, 2026 Changes in this version + const LabelConfigHash + const LabelManaged + const LabelName + const LabelProject + var StdCopy = stdcopy.StdCopy + func ConfigHash(data []byte) string + func ContainerName(projectDir string) string + func DeleteMeta(name string) error + func DevcontainersDir() string + func FindConfig(projectDir string) (string, error) + func ImageName(projectDir, configHash string) string + func InstallFeatures(ctx context.Context, docker DockerClient, puller FeaturePuller, ...) error + func ManagedLabels(projectDir, name, configHash string) map[string]string + func MetaPath(name string) string + func ParseRunArgs(args []string, opts *ContainerCreateOptions, logger zerolog.Logger) + func RunHook(ctx context.Context, docker DockerClient, containerID, user string, ...) error + func RunLifecycleHooks(ctx context.Context, docker DockerClient, containerID, user string, ...) error + func SanitizeName(name string) string + func StripJSONC(data []byte) []byte + func WriteMeta(m Meta) error + type BuildConfig struct + Args map[string]string + CacheFrom []string + Context string + Dockerfile string + Target string + type ContainerConfigInfo struct + Env []string + Labels map[string]string + type ContainerCreateOptions struct + Binds []string + CapAdd []string + Cmd []string + Env []string + ExtraHosts []string + Image string + Labels map[string]string + Name string + NetworkMode string + Privileged bool + SecurityOpt []string + ShmSize int64 + User string + WorkingDir string + type ContainerInspectResponse struct + Config ContainerConfigInfo + ID string + Image string + Name string + State ContainerState + type ContainerListOptions struct + All bool + LabelFilters map[string]string + NameFilter string + type ContainerRemoveOptions struct + Force bool + RemoveVolumes bool + type ContainerState struct + ExitCode int + Running bool + Status string + type ContainerSummary struct + ID string + Image string + Labels map[string]string + Names []string + State string + type DevcontainerConfig struct + Build *BuildConfig + CapAdd []string + ContainerEnv map[string]string + ContainerUser string + DockerFile string + Features map[string]interface{} + ForwardPorts []interface{} + Image string + InitializeCommand interface{} + Mounts []interface{} + Name string + OnCreateCommand interface{} + OverrideCommand *bool + PostAttachCommand interface{} + PostCreateCommand interface{} + PostStartCommand interface{} + Privileged bool + RemoteEnv map[string]string + RemoteUser string + RunArgs []string + SecurityOpt []string + UpdateContentCommand interface{} + WorkspaceFolder string + func ParseConfig(data []byte) (*DevcontainerConfig, error) + func ReadConfig(projectDir string) (*DevcontainerConfig, error) + func ResolveVariables(cfg *DevcontainerConfig, projectDir string) *DevcontainerConfig + type DockerClient interface + Close func() error + ContainerCommit func(ctx context.Context, containerID string, ref string) (string, error) + ContainerCreate func(ctx context.Context, opts ContainerCreateOptions) (string, error) + ContainerInspect func(ctx context.Context, containerID string) (ContainerInspectResponse, error) + ContainerList func(ctx context.Context, opts ContainerListOptions) ([]ContainerSummary, error) + ContainerLogs func(ctx context.Context, containerID string, opts LogsOptions) (io.ReadCloser, error) + ContainerRemove func(ctx context.Context, containerID string, opts ContainerRemoveOptions) error + ContainerStart func(ctx context.Context, containerID string) error + ContainerStop func(ctx context.Context, containerID string, timeout *int) error + CopyToContainer func(ctx context.Context, containerID, dstPath string, content io.Reader) error + ExecAttach func(ctx context.Context, execID string) (ExecAttachResponse, error) + ExecCreate func(ctx context.Context, containerID string, cmd []string, opts ExecOptions) (string, error) + ExecInspect func(ctx context.Context, execID string) (ExecInspectResponse, error) + ImageBuild func(ctx context.Context, buildContext io.Reader, opts ImageBuildOptions) (io.ReadCloser, error) + ImageInspect func(ctx context.Context, imageRef string) (ImageInspectResponse, error) + ImageList func(ctx context.Context, opts ImageListOptions) ([]ImageSummary, error) + ImagePull func(ctx context.Context, ref string, opts ImagePullOptions) (io.ReadCloser, error) + func NewDockerClient() (DockerClient, error) + type ExecAttachResponse struct + Conn io.Closer + Reader io.Reader + func (r ExecAttachResponse) Close() error + type ExecInspectResponse struct + ExitCode int + Running bool + type ExecOptions struct + AttachStderr bool + AttachStdin bool + AttachStdout bool + Env []string + Tty bool + User string + WorkingDir string + type FeatureMeta struct + ContainerEnv map[string]string + ID string + InstallsAfter []string + Name string + Options map[string]FeatureOption + Version string + type FeatureOption struct + Default interface{} + Type string + type FeaturePuller interface + Pull func(ctx context.Context, ref string) (installSh []byte, meta *FeatureMeta, err error) + type HumanConfig struct + ConfigDir string + func LoadHumanConfig(dir string) (*HumanConfig, error) + type ImageBuildOptions struct + BuildArgs map[string]*string + CacheFrom []string + Dockerfile string + Remove bool + Tags []string + Target string + type ImageBuilder struct + Docker DockerClient + Logger zerolog.Logger + func (b *ImageBuilder) EnsureImage(ctx context.Context, cfg *DevcontainerConfig, projectDir, configHash string, ...) (string, string, error) + type ImageInspectResponse struct + ID string + Tags []string + type ImageListOptions struct + LabelFilters map[string]string + type ImagePullOptions struct + RegistryAuth string + type ImageSummary struct + ID string + Tags []string + type LogsOptions struct + Follow bool + ShowStderr bool + ShowStdout bool + Tail string + type Manager struct + Docker DockerClient + Logger zerolog.Logger + func (m *Manager) Down(ctx context.Context, name string, removeVolumes bool) error + func (m *Manager) Exec(ctx context.Context, containerID string, cmd []string, user string, ...) (int, error) + func (m *Manager) List(ctx context.Context) ([]Meta, error) + func (m *Manager) Status(ctx context.Context, name string) (*Meta, error) + func (m *Manager) Stop(ctx context.Context, name string) error + func (m *Manager) Up(ctx context.Context, opts UpOptions) (*Meta, error) + type Meta struct + ConfigHash string + ContainerID string + ContainerName string + CreatedAt time.Time + DaemonAddr string + ImageID string + ImageName string + Name string + ProjectDir string + RemoteUser string + StartedAt time.Time + Status Status + StoppedAt time.Time + WorkspaceDir string + func ListMetas() ([]Meta, error) + func ReadMeta(name string) (Meta, error) + type OCIFeaturePuller struct + func (p *OCIFeaturePuller) Pull(_ context.Context, featureRef string) ([]byte, *FeatureMeta, error) + type Status string + const StatusCreating + const StatusFailed + const StatusRunning + const StatusStopped + type UpOptions struct + ContainerName string + DaemonInfo *daemon.DaemonInfo + Out io.Writer + ProjectDir string + Rebuild bool + SourceDir string