dockercompose

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dockercompose redirects Docker Compose SDK logs (logrus) to slog used by composeflux.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	LoadProject(ctx context.Context, composeCfg ComposeConfig) (*types.Project, error)

	Build(ctx context.Context, project *types.Project) error
	Down(ctx context.Context, projectName string) error
	HasImageUpdates(ctx context.Context, project *types.Project) (bool, error)
	List(ctx context.Context) ([]api.Stack, error)
	Ps(ctx context.Context, projectName string) ([]api.ContainerSummary, error)
	Pull(ctx context.Context, project *types.Project) error
	Restart(ctx context.Context, projectName string) error
	Up(ctx context.Context, project *types.Project) error

	Prune(ctx context.Context)
	Version(ctx context.Context) ([]any, error)
}

func New

func New(cfg Config) (Client, error)

type ComposeConfig

type ComposeConfig struct {
	ComposeFiles []string
	WorkingDir   string
	Env          []string
}

type Config

type Config struct {
	RemoveOrphans bool `name:"remove-orphans" help:"Remove orphan containers" env:"REMOVE_ORPHANS" default:"true" group:"Docker Compose Options:"`
}

type ProjectDependencies added in v0.15.0

type ProjectDependencies struct {
	FilePaths     []string // File paths or volume mount paths
	BuildContexts []string // Build context directories (matched recursively)
}

ProjectDependencies represents all file paths and build context directories that a compose project depends on.

func GetDependencyPaths added in v0.15.0

func GetDependencyPaths(project *types.Project) ProjectDependencies

GetDependencyPaths extracts all file paths and build contexts that this compose project depends on (compose files, included files, env files, bind mount host sources, config/secret files, build context/dockerfiles).

Jump to

Keyboard shortcuts

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