docker

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package docker provides an implementation of github.com/frantjc/forge.ContainerRuntime by interacting with a `docker` compatible CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	ID   string
	Path string
}

func (*Container) CopyFrom

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

func (*Container) CopyTo

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

func (*Container) Exec

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

func (*Container) GetID

func (c *Container) GetID() string

func (*Container) Remove

func (c *Container) Remove(ctx context.Context) 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 {
	Path string
}

func New

func New(path string) *ContainerRuntime

func (*ContainerRuntime) Close added in v1.0.2

func (r *ContainerRuntime) Close() error

func (*ContainerRuntime) CreateContainer

func (r *ContainerRuntime) CreateContainer(ctx context.Context, img forge.Image, cfg *forge.ContainerConfig) (forge.Container, error)

func (*ContainerRuntime) PullImage

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

type Image

type Image struct {
	Ref  string
	Path string
}

func (*Image) Blob

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

func (*Image) Config

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

func (*Image) Name added in v1.0.2

func (i *Image) Name() string

Jump to

Keyboard shortcuts

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