docker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package docker wraps the docker / docker compose CLIs via os/exec, staying true to the Docker workflow developers already use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(dir, dockerfile, tag string) error

Build builds an image from the Dockerfile in dir and tags it.

func ComposeDown

func ComposeDown(dir, composeFile string) error

ComposeDown stops and removes the compose project's resources.

func ComposeLogs

func ComposeLogs(dir, composeFile string, follow bool) error

ComposeLogs streams logs for the compose project (-f follow optional).

func ComposeUp

func ComposeUp(dir, composeFile string, build bool, envFile string) error

ComposeUp starts the compose project in detached mode, optionally building.

func RemoveContainer

func RemoveContainer(id string) error

RemoveContainer force-removes a container by ID (ignores already-gone).

func Run

func Run(dir, tag string, hostPort, containerPort int, envFile string) (string, error)

Run starts a detached container mapping hostPort -> containerPort and returns the container ID.

func RunLogs

func RunLogs(containerID string, follow bool) error

RunLogs shows logs for a container started with docker run.

Types

This section is empty.

Jump to

Keyboard shortcuts

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