Documentation
¶
Overview ¶
package docker provides an implementation of github.com/frantjc/forge.ContainerRuntime by interacting with a Docker daemon via a *github.com/docker/docker/client.Client.
Index ¶
- type Container
- func (c *Container) CopyFrom(ctx context.Context, source string) (io.ReadCloser, error)
- func (c *Container) CopyTo(ctx context.Context, destination string, content io.Reader) error
- func (c *Container) Exec(ctx context.Context, containerConfig *forge.ContainerConfig, ...) (int, error)
- func (c *Container) GetID() string
- func (c *Container) GoString() string
- func (c *Container) Kill(ctx context.Context) error
- func (c *Container) Remove(ctx context.Context) error
- func (c *Container) Restart(ctx context.Context) error
- func (c *Container) Run(ctx context.Context, streams *forge.Streams) (int, error)
- func (c *Container) Start(ctx context.Context) error
- func (c *Container) Stop(ctx context.Context) error
- type ContainerRuntime
- func (d *ContainerRuntime) BuildDockerfile(ctx context.Context, dockerfile, reference string) (forge.Image, error)
- func (d *ContainerRuntime) CreateContainer(ctx context.Context, image forge.Image, config *forge.ContainerConfig) (forge.Container, error)
- func (d *ContainerRuntime) GetContainer(ctx context.Context, id string) (forge.Container, error)
- func (d *ContainerRuntime) GoString() string
- func (d *ContainerRuntime) PullImage(ctx context.Context, reference string) (forge.Image, error)
- type Image
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type ContainerRuntime ¶
type ContainerRuntime struct { // Client interacts with a Docker daemon. *client.Client // DockerInDockerPath signals whether or not to mount the docker.sock of the // *github.com/docker/docker/client.Client and configuration to direct // `docker` to it into each container that it runs. DockerInDockerPath string }
ContainerRuntime implements github.com/frantjc/forge.ContainerRuntime.
func (*ContainerRuntime) BuildDockerfile ¶
func (*ContainerRuntime) CreateContainer ¶
func (d *ContainerRuntime) CreateContainer(ctx context.Context, image forge.Image, config *forge.ContainerConfig) (forge.Container, error)
func (*ContainerRuntime) GetContainer ¶
func (*ContainerRuntime) GoString ¶
func (d *ContainerRuntime) GoString() string
type Image ¶
func (*Image) Config ¶
func (i *Image) Config() (*imagespecsv1.ImageConfig, error)
func (*Image) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.