Documentation
¶
Overview ¶
Package docker implements the runtime.Runtime interface using the Docker Engine API.
Index ¶
- type Docker
- func (d *Docker) Close() error
- func (d *Docker) ImageExists(ctx context.Context, imageRef string) bool
- func (d *Docker) InspectSelf(ctx context.Context) (runtime.ContainerInfo, error)
- func (d *Docker) Ping(ctx context.Context) error
- func (d *Docker) PullImage(ctx context.Context, imageRef string) error
- func (d *Docker) RunContainer(ctx context.Context, info runtime.ContainerInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker implements runtime.Runtime using the Docker Engine API.
func New ¶
New creates a new Docker runtime client. It uses environment variables (DOCKER_HOST, etc.) and API version negotiation.
func (*Docker) ImageExists ¶
ImageExists reports whether the given image reference exists locally.
func (*Docker) InspectSelf ¶
InspectSelf returns the container configuration for the current container. It uses os.Hostname() to get the container ID (Docker sets HOSTNAME to the container short ID).
func (*Docker) RunContainer ¶
RunContainer creates and starts a new container with the given configuration.
Click to show internal directories.
Click to hide internal directories.