docker

package
v0.0.0-...-1f0a1f7 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingDeviceDriver = errors.New("Docker is missing required device driver")
View Source
var ErrNoSuchImage = errors.New("No image returned")

Functions

func Build

func Build(dir, dockerfile, imageName string, secrets []string, noCache bool, progressOutput string, epoch int64) error

func BuildAddLabelsAndSchemaToImage

func BuildAddLabelsAndSchemaToImage(image string, labels map[string]string, bundledSchemaFile string, bundledSchemaPy string) error

func ContainerInspect

func ContainerInspect(id string) (*types.ContainerJSON, error)

func ContainerLogsFollow

func ContainerLogsFollow(containerID string, out io.Writer) error

func GetPort

func GetPort(containerID string, containerPort int) (int, error)

func ImageExists

func ImageExists(id string) (bool, error)

func ImageInspect

func ImageInspect(id string) (*types.ImageInspect, error)

func ManifestInspect

func ManifestInspect(image string) error

func Pull

func Pull(image string) error

func Push

func Push(image string) error

func Run

func Run(options RunOptions) error

func RunDaemon

func RunDaemon(options RunOptions, stderr io.Writer) (string, error)

func RunWithIO

func RunWithIO(options RunOptions, stdin io.Reader, stdout, stderr io.Writer) error

func SaveLoginToken

func SaveLoginToken(registryHost string, username string, token string) error

func Stop

func Stop(id string) error

Types

type Port

type Port struct {
	HostPort      int
	ContainerPort int
}

type RunOptions

type RunOptions struct {
	Args     []string
	Env      []string
	GPUs     string
	Image    string
	Ports    []Port
	Volumes  []Volume
	Workdir  string
	Platform string
}

type Volume

type Volume struct {
	Source      string
	Destination string
}

Jump to

Keyboard shortcuts

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