docker

package
v0.0.0-...-f9ea6e8 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStartFailed = errors.New("failed to start container")

Functions

func CreateNetwork

func CreateNetwork(name string) (string, error)

func GetContainer

func GetContainer(containerName string) (*types.Container, error)

func Run

func Run(image string, args ...Arg) error

func WithCappAdd

func WithCappAdd(capStr string) func(*dockerArgs)

func WithCredentials

func WithCredentials(credentials *registry.AuthConfig) func(*dockerArgs)

func WithEntrypoint

func WithEntrypoint(entrypoint []string) func(*dockerArgs)

func WithEnvVar

func WithEnvVar(key, value string) func(*dockerArgs)

func WithNetwork

func WithNetwork(networkName string) func(*dockerArgs)

func WithPublishedPort

func WithPublishedPort(publishedPort PublishedPort) func(*dockerArgs)

Types

type Arg

type Arg func(*dockerArgs)

type PublishedPort

type PublishedPort struct {
	ContainerPort string
	HostIP        string
	HostPort      string
}

Jump to

Keyboard shortcuts

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