docker

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 18 Imported by: 0 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

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidValueForOverlayModifier = errors.New("invalid value for overlay modifier")

Functions

This section is empty.

Types

type Compose

type Compose struct {
	// contains filtered or unexported fields
}

func NewCompose

func NewCompose(cli cli, tui tui, overlayGenerator composeOverlayGenerator, parser composeParser) *Compose

func (*Compose) DoesSvcExist

func (c *Compose) DoesSvcExist(ws *workspace.Workspace, p *workspace.Project, service string) (bool, error)

TODO: guard against nil arguments

func (*Compose) Down

func (c *Compose) Down(ws *workspace.Workspace, p *workspace.Project) error

TODO: guard against nil arguments

func (*Compose) Exec

func (c *Compose) Exec(ws *workspace.Workspace, p *workspace.Project, service string, cmdArgs []string, output io.Writer) error

Exec runs a command in the service, in its running container. With output, the command isn't attached to a terminal, and what it writes goes to output, e.g. when a hook runs it. Without, it uses the host's terminal, so it can be interactive.

TODO: guard against nil inputs

func (*Compose) IsProjectRunning added in v0.21.0

func (c *Compose) IsProjectRunning(ws *workspace.Workspace, p *workspace.Project) (bool, error)

IsProjectRunning reports whether any of the project's containers are running. It finds them by their compose project label, so it works without the project's compose files, even for a project that isn't cloned.

func (*Compose) IsSvcRunning

func (c *Compose) IsSvcRunning(ws *workspace.Workspace, p *workspace.Project, service string) (bool, error)

TODO: guard against nil arguments

func (*Compose) LoadRawSpec

func (c *Compose) LoadRawSpec(ws *workspace.Workspace, p *workspace.Project) (string, error)

TODO: guard against nil arguments

func (*Compose) LoadSpec

func (c *Compose) LoadSpec(ws *workspace.Workspace, p *workspace.Project) (*types.Project, error)

TODO: guard against nil arguments

func (*Compose) Logs

func (c *Compose) Logs(ws *workspace.Workspace, p *workspace.Project, service string) error

TODO: guard against nil arguments

func (*Compose) Run

func (c *Compose) Run(ws *workspace.Workspace, p *workspace.Project, service string, cmdArgs []string, output io.Writer) error

Run runs a command in the service in a new container, removed afterwards. With output, the command isn't attached to a terminal, and what it writes goes to output, e.g. when a hook runs it. Without, it uses the host's terminal, so it can be interactive.

TODO: guard against nil inputs

func (*Compose) ServiceNames added in v0.20.0

func (c *Compose) ServiceNames(p *workspace.Project) ([]string, error)

ServiceNames returns the names of the services in the project's compose file, sorted. The file is parsed directly, rather than asking docker, so it's quick, and works when docker isn't running.

func (*Compose) ShowCommand

func (c *Compose) ShowCommand(ws *workspace.Workspace, p *workspace.Project) error

TODO: guard against nil inputs

func (*Compose) ShowConfig

func (c *Compose) ShowConfig(ws *workspace.Workspace, p *workspace.Project) error

TODO: guard against nil inputs

func (*Compose) Up

TODO: guard against nil arguments

type ComposeOverlayGenerator

type ComposeOverlayGenerator struct {
	// contains filtered or unexported fields
}

func NewComposeOverlayGenerator

func NewComposeOverlayGenerator(fs afero.Fs, parser overlayComposeParser, overlayDir string, tlsCertsDir string) *ComposeOverlayGenerator

func (*ComposeOverlayGenerator) CreateOrRetrieve

func (cog *ComposeOverlayGenerator) CreateOrRetrieve(ws *workspace.Workspace, p *workspace.Project) (string, error)

type ComposeParser

type ComposeParser struct {
}

func NewComposeParser

func NewComposeParser() *ComposeParser

func (*ComposeParser) Parse

func (cp *ComposeParser) Parse(paths []string, envFiles []string) (*types.Project, error)

Jump to

Keyboard shortcuts

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