docker

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const VolumeDriver = "local"

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID string
	*client.Client
}

func (*Container) CopyFrom

func (c *Container) CopyFrom(ctx context.Context, source string) (io.ReadCloser, error)

func (*Container) CopyTo

func (c *Container) CopyTo(ctx context.Context, destination string, content io.Reader) error

func (*Container) Exec

func (c *Container) Exec(ctx context.Context, containerConfig *forge.ContainerConfig, streams *forge.Streams) (int, error)

func (*Container) GetID

func (c *Container) GetID() string

func (*Container) GoString

func (c *Container) GoString() string

func (*Container) Kill

func (c *Container) Kill(ctx context.Context) error

func (*Container) Remove

func (c *Container) Remove(ctx context.Context) error

func (*Container) Restart

func (c *Container) Restart(ctx context.Context) error

func (*Container) Run

func (c *Container) Run(ctx context.Context, streams *forge.Streams) (int, error)

func (*Container) Start

func (c *Container) Start(ctx context.Context) error

func (*Container) Stop

func (c *Container) Stop(ctx context.Context) error

type ContainerRuntime

type ContainerRuntime struct {
	*client.Client
}

func New

func (*ContainerRuntime) BuildDockerfile

func (d *ContainerRuntime) BuildDockerfile(ctx context.Context, dir, reference string) (forge.Image, error)

func (*ContainerRuntime) CreateContainer

func (d *ContainerRuntime) CreateContainer(ctx context.Context, image forge.Image, config *forge.ContainerConfig) (forge.Container, error)

func (*ContainerRuntime) CreateVolume

func (r *ContainerRuntime) CreateVolume(ctx context.Context, name string) (forge.Volume, error)

func (*ContainerRuntime) GetContainer

func (d *ContainerRuntime) GetContainer(ctx context.Context, id string) (forge.Container, error)

func (*ContainerRuntime) GoString

func (f *ContainerRuntime) GoString() string

func (*ContainerRuntime) PullImage

func (d *ContainerRuntime) PullImage(ctx context.Context, reference string) (forge.Image, error)

type Image

type Image struct {
	v1.Image
	name.Reference
}

func (*Image) Blob

func (i *Image) Blob() io.Reader

func (*Image) Config

func (i *Image) Config() (*imagespecsv1.ImageConfig, error)

func (*Image) Digest

func (i *Image) Digest() (digest.Digest, error)

func (*Image) GoString

func (i *Image) GoString() string

func (*Image) Manifest

func (i *Image) Manifest() (manifest *imagespecsv1.Manifest, _ error)

func (*Image) MarshalJSON

func (i *Image) MarshalJSON() ([]byte, error)

type Volume

type Volume struct {
	ID string
	*client.Client
}

func (*Volume) GetID

func (v *Volume) GetID() string

func (*Volume) GoString

func (v *Volume) GoString() string

func (*Volume) Remove

func (v *Volume) Remove(ctx context.Context) error

Jump to

Keyboard shortcuts

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