exec

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package exec is the DockerClient that runs the docker binary through a CommandRunner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client runs docker in a working directory.

func New

func New(runner interfaces.CommandRunner, root string) *Client

New returns the Client running docker in root. It does no I/O.

func (*Client) Build

func (c *Client) Build(ctx context.Context, spec types.BuildSpec) error

Build runs `docker buildx build --load` without provenance or SBOM attestations, so the image loads into the local daemon.

func (*Client) ComposeDown

func (c *Client) ComposeDown(ctx context.Context, spec types.ComposeSpec) error

ComposeDown runs `docker compose … down [--volumes]`.

func (*Client) ComposeUp

func (c *Client) ComposeUp(ctx context.Context, spec types.ComposeSpec) error

ComposeUp runs `docker compose … up -d --wait [services]`.

func (*Client) Inspect

func (c *Client) Inspect(ctx context.Context, ref string) ([]byte, error)

Inspect runs `docker image inspect ref`; a missing image is CodeNotFound.

func (*Client) Push

func (c *Client) Push(ctx context.Context, ref string) error

Push runs `docker push ref`.

Jump to

Keyboard shortcuts

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