Versions in this module Expand all Collapse all v5 v5.0.1 Dec 18, 2025 Changes in this version + const ComposeCompatibility + const StatusConfigured + const StatusConfiguring + const StatusDownloadComplete + const StatusDownloading v5.0.0 Dec 2, 2025 Changes in this version + const ConfigFilesLabel + const ConfigHashLabel + const ContainerEventCreated + const ContainerEventErr + const ContainerEventExited + const ContainerEventLog + const ContainerEventRecreated + const ContainerEventRestarted + const ContainerEventStarted + const ContainerEventStopped + const ContainerNumberLabel + const ContainerReplaceLabel + const DependenciesLabel + const EnvironmentFileLabel + const ExitCodeLoginRequired + const FAILED + const HookEventLog + const ImageBuilderLabel + const ImageDigestLabel + const NetworkLabel + const OneoffLabel + const ProjectLabel + const REMOVING + const RUNNING + const RecreateDiverged + const RecreateForce + const RecreateNever + const ResourceCompose + const STARTING + const ServiceLabel + const SlugLabel + const StatusBuilding + const StatusBuilt + const StatusCommitted + const StatusCommitting + const StatusCopied + const StatusCopying + const StatusCreated + const StatusCreating + const StatusError + const StatusExited + const StatusExported + const StatusExporting + const StatusHealthy + const StatusKilled + const StatusKilling + const StatusPulled + const StatusPulling + const StatusRemoved + const StatusRemoving + const StatusRestarted + const StatusRestarting + const StatusRunning + const StatusStarted + const StatusStarting + const StatusStopped + const StatusStopping + const StatusWaiting + const UNKNOWN + const UPDATING + const VersionLabel + const VolumeLabel + const WatchLogger + const WorkingDirLabel + var ComposeVersion string + var ErrAlreadyExists = errors.New("already exists") + var ErrCanceled = errors.New("canceled") + var ErrForbidden = errors.New("forbidden") + var ErrNoResources = errors.New("no resources") + var ErrNotFound = errors.New("not found") + var ErrNotImplemented = errors.New("not implemented") + var ErrParsingFailed = errors.New("parsing failed") + var ErrUnknown = errors.New("unknown") + var ErrUnsupportedFlag = errors.New("unsupported flag") + var Separator = "-" + func GetImageNameOrDefault(service types.ServiceConfig, projectName string) string + func IsAlreadyExistsError(err error) bool + func IsErrCanceled(err error) bool + func IsErrNotImplemented(err error) bool + func IsErrParsingFailed(err error) bool + func IsErrUnsupportedFlag(err error) bool + func IsForbiddenError(err error) bool + func IsNotFoundError(err error) bool + func IsUnknownError(err error) bool + type AttachOptions struct + DetachKeys string + Index int + NoStdin bool + Project *types.Project + Proxy bool + Service string + type BuildOptions struct + Args types.MappingWithEquals + Attestations bool + Builder string + Check bool + Deps bool + Memory int64 + NoCache bool + Out io.Writer + Print bool + Progress string + Provenance string + Pull bool + Push bool + Quiet bool + SBOM string + SSHs []types.SSHKey + Services []string + func (o BuildOptions) Apply(project *types.Project) error + type Cascade int + const CascadeFail + const CascadeIgnore + const CascadeStop + type CommitOptions struct + Author string + Changes opts.ListOpts + Comment string + Index int + Pause bool + Reference string + Service string + type Compose interface + Attach func(ctx context.Context, projectName string, options AttachOptions) error + Build func(ctx context.Context, project *types.Project, options BuildOptions) error + Commit func(ctx context.Context, projectName string, options CommitOptions) error + Copy func(ctx context.Context, projectName string, options CopyOptions) error + Create func(ctx context.Context, project *types.Project, options CreateOptions) error + Down func(ctx context.Context, projectName string, options DownOptions) error + Events func(ctx context.Context, projectName string, options EventsOptions) error + Exec func(ctx context.Context, projectName string, options RunOptions) (int, error) + Export func(ctx context.Context, projectName string, options ExportOptions) error + Generate func(ctx context.Context, options GenerateOptions) (*types.Project, error) + Images func(ctx context.Context, projectName string, options ImagesOptions) (map[string]ImageSummary, error) + Kill func(ctx context.Context, projectName string, options KillOptions) error + List func(ctx context.Context, options ListOptions) ([]Stack, error) + LoadProject func(ctx context.Context, options ProjectLoadOptions) (*types.Project, error) + Logs func(ctx context.Context, projectName string, consumer LogConsumer, ...) error + Pause func(ctx context.Context, projectName string, options PauseOptions) error + Port func(ctx context.Context, projectName string, service string, port uint16, ...) (string, int, error) + Ps func(ctx context.Context, projectName string, options PsOptions) ([]ContainerSummary, error) + Publish func(ctx context.Context, project *types.Project, repository string, ...) error + Pull func(ctx context.Context, project *types.Project, options PullOptions) error + Push func(ctx context.Context, project *types.Project, options PushOptions) error + Remove func(ctx context.Context, projectName string, options RemoveOptions) error + Restart func(ctx context.Context, projectName string, options RestartOptions) error + RunOneOffContainer func(ctx context.Context, project *types.Project, opts RunOptions) (int, error) + Scale func(ctx context.Context, project *types.Project, options ScaleOptions) error + Start func(ctx context.Context, projectName string, options StartOptions) error + Stop func(ctx context.Context, projectName string, options StopOptions) error + Top func(ctx context.Context, projectName string, services []string) ([]ContainerProcSummary, error) + UnPause func(ctx context.Context, projectName string, options PauseOptions) error + Up func(ctx context.Context, project *types.Project, options UpOptions) error + Viz func(ctx context.Context, project *types.Project, options VizOptions) (string, error) + Volumes func(ctx context.Context, project string, options VolumesOptions) ([]VolumesSummary, error) + Wait func(ctx context.Context, projectName string, options WaitOptions) (int64, error) + Watch func(ctx context.Context, project *types.Project, options WatchOptions) error + type ConfigOptions struct + Format string + Output string + ResolveImageDigests bool + type ContainerEvent struct + Container *ContainerSummary + ExitCode int + ID string + Line string + Restarting bool + Service string + Source string + Time int64 + Type int + type ContainerEventListener func(event ContainerEvent) + type ContainerProcSummary struct + ID string + Name string + Processes [][]string + Replica string + Service string + Titles []string + type ContainerSummary struct + Command string + Created int64 + ExitCode int + Health string + ID string + Image string + Labels map[string]string + LocalVolumes int + Mounts []string + Name string + Names []string + Networks []string + Project string + Publishers PortPublishers + Service string + SizeRootFs int64 + SizeRw int64 + State string + Status string + type ContextInfo interface + BuildKitEnabled func() (bool, error) + CurrentContext func() string + ServerOSType func() string + type CopyOptions struct + All bool + CopyUIDGID bool + Destination string + FollowLink bool + Index int + Source string + type CreateOptions struct + Build *BuildOptions + IgnoreOrphans bool + Inherit bool + QuietPull bool + Recreate string + RecreateDependencies string + RemoveOrphans bool + Services []string + Timeout *time.Duration + type DownOptions struct + Images string + Project *types.Project + RemoveOrphans bool + Services []string + Timeout *time.Duration + Volumes bool + type Event struct + Attributes map[string]string + Container string + Service string + Status string + Timestamp time.Time + func (e Event) String() string + type EventProcessor interface + Done func(operation string, success bool) + On func(events ...Resource) + Start func(ctx context.Context, operation string) + type EventStatus int + const Done + const Error + const Warning + const Working + type EventsOptions struct + Consumer func(event Event) error + Services []string + Since string + Until string + type ExportOptions struct + Index int + Output string + Service string + type GenerateOptions struct + Containers []string + ProjectName string + type ImageSummary struct + Created *time.Time + ID string + LastTagTime time.Time + Platform platforms.Platform + Repository string + Size int64 + Tag string + type ImagesOptions struct + Services []string + type KillOptions struct + All bool + Project *types.Project + RemoveOrphans bool + Services []string + Signal string + type ListOptions struct + All bool + type LoadListener func(event string, metadata map[string]any) + type LogConsumer interface + Err func(containerName, message string) + Log func(containerName, message string) + Status func(container, msg string) + type LogOptions struct + Follow bool + Index int + Project *types.Project + Services []string + Since string + Tail string + Timestamps bool + Until string + type OCIOptions struct + InsecureRegistries []string + type OCIVersion string + const OCIVersion1_0 + const OCIVersion1_1 + type PauseOptions struct + Project *types.Project + Services []string + type PortOptions struct + Index int + Protocol string + type PortPublisher struct + Protocol string + PublishedPort int + TargetPort int + URL string + type PortPublishers []PortPublisher + func (p PortPublishers) Len() int + func (p PortPublishers) Less(i, j int) bool + func (p PortPublishers) Swap(i, j int) + type ProjectLoadOptions struct + All bool + Compatibility bool + ConfigPaths []string + EnvFiles []string + LoadListeners []LoadListener + OCI OCIOptions + Offline bool + Profiles []string + ProjectName string + ProjectOptionsFns []cli.ProjectOptionsFn + Services []string + WorkingDir string + type PsOptions struct + All bool + Project *types.Project + Services []string + type PublishOptions struct + Application bool + InsecureRegistry bool + OCIVersion OCIVersion + ResolveImageDigests bool + WithEnvironment bool + type PullOptions struct + IgnoreBuildable bool + IgnoreFailures bool + Quiet bool + type PushOptions struct + IgnoreFailures bool + ImageMandatory bool + Quiet bool + type RemoveOptions struct + Force bool + Project *types.Project + Services []string + Stop bool + Volumes bool + type Resource struct + Current int64 + Details string + ID string + ParentID string + Percent int + Status EventStatus + Text string + Total int64 + func (e *Resource) StatusText() string + type RestartOptions struct + NoDeps bool + Project *types.Project + Services []string + Timeout *time.Duration + type RunOptions struct + AutoRemove bool + CapAdd []string + CapDrop []string + Command []string + Detach bool + Entrypoint []string + Environment []string + Index int + Interactive bool + Labels types.Labels + Name string + NoDeps bool + Privileged bool + Project *types.Project + Service string + Tty bool + UseNetworkAliases bool + User string + WorkingDir string + type ScaleOptions struct + Services []string + type ServiceStatus struct + Desired int + ID string + Name string + Ports []string + Publishers []PortPublisher + Replicas int + type Stack struct + ConfigFiles string + ID string + Name string + Reason string + Status string + type StartOptions struct + Attach LogConsumer + AttachTo []string + ExitCodeFrom string + NavigationMenu bool + OnExit Cascade + Project *types.Project + Services []string + Wait bool + WaitTimeout time.Duration + Watch bool + type StopOptions struct + Project *types.Project + Services []string + Timeout *time.Duration + type UpOptions struct + Create CreateOptions + Start StartOptions + type VizOptions struct + IncludeImageName bool + IncludeNetworks bool + IncludePorts bool + Indentation string + type VolumesOptions struct + Services []string + type VolumesSummary = *volume.Volume + type WaitOptions struct + DownProjectOnContainerExit bool + Services []string + type WatchOptions struct + Build *BuildOptions + LogTo LogConsumer + Prune bool + Services []string v5.0.0-rc.2 Nov 13, 2025 Other modules containing this package github.com/docker/compose/v2