compose

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package compose runs docker compose as a subprocess (readme §4.4).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HintIfComposePluginError

func HintIfComposePluginError(stderr string, err error) error

HintIfComposePluginError appends install hint when a failed docker compose run looks like a missing plugin.

func LookPathDocker

func LookPathDocker() error

LookPathDocker returns an error if docker is not found in PATH.

func RequireComposeV2Plugin

func RequireComposeV2Plugin() error

RequireComposeV2Plugin checks that `docker compose` (Compose V2 CLI plugin) is available. dq does not fall back to standalone `docker-compose` (V1); users should install the plugin.

Types

type Runner

type Runner struct {
	ProjectRoot        string
	ComposeFile        string
	ComposeProjectName string
	DockerBin          string // default "docker"
}

Runner executes docker compose in projectRoot with project and file flags.

func (*Runner) Command

func (r *Runner) Command(args ...string) *exec.Cmd

Command builds *exec.Cmd for docker compose with extra args (not run).

func (*Runner) Run

func (r *Runner) Run(args ...string) error

Run executes docker compose args and returns combined error from Wait.

func (*Runner) RunCommand

func (r *Runner) RunCommand(cmd *exec.Cmd) error

RunCommand runs a command built with Command(), teeing stderr for compose-plugin hints on failure.

Jump to

Keyboard shortcuts

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