docker

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, container string, options DeleteOptions) error

func Exec

func Exec(ctx context.Context, container string, options ExecOptions, command string, args ...string) error

func ExecInteractive

func ExecInteractive(ctx context.Context, container string, options ExecOptions, shell string, args ...string) error

func Logs

func Logs(ctx context.Context, container string, options LogsOptions) error

func Path

func Path(ctx context.Context) (string, *semver.Version, error)

func PortForward added in v0.0.5

func PortForward(ctx context.Context, container string, source, target int) error

func Pull

func Pull(ctx context.Context, image string, options PullOptions) error

func Run

func Run(ctx context.Context, image string, options RunOptions, args ...string) error

func RunInteractive

func RunInteractive(ctx context.Context, image string, options RunOptions, args ...string) error

func Tool

func Tool(ctx context.Context) (string, *semver.Version, error)

Types

type Container

type Container struct {
	ID string

	Names  []string
	Labels map[string]string

	Image string `json:"Image"`
}

func List

func List(ctx context.Context, options ListOptions) ([]Container, error)

type ContainerInfo added in v0.0.5

type ContainerInfo struct {
	ID   string
	Name string

	Image    string
	Platform string

	Cmd  string
	Env  map[string]string
	Args []string

	Ports map[int]int

	IPAddress string
}

func Info added in v0.0.5

func Info(ctx context.Context, container string) (*ContainerInfo, error)

type DeleteOptions

type DeleteOptions struct {
	Force   bool
	Volumes bool
}

type ExecOptions

type ExecOptions struct {
	Privileged bool

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	TTY         bool
	Interactive bool

	Dir  string
	User string

	Env map[string]string
}

type ListOptions

type ListOptions struct {
	All bool

	Filter []string
}

type LogsOptions

type LogsOptions struct {
	Follow bool

	Stdout io.Writer
	Stderr io.Writer
}

type PullOptions

type PullOptions struct {
	Stdout io.Writer
	Stderr io.Writer
}

type RunOptions

type RunOptions struct {
	Name   string
	Labels map[string]string

	Platform string

	Temporary  bool
	Privileged bool

	MaxNoProcs int
	MaxNoFiles int

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer

	Attach      bool
	TTY         bool
	Interactive bool

	Dir  string
	User string

	Env     map[string]string
	Ports   map[int]int
	Volumes map[string]string
}

Jump to

Keyboard shortcuts

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