docker

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetrieveLocalDockerRegistryAuth added in v0.13.0

func RetrieveLocalDockerRegistryAuth(image string) (string, error)

RetrieveLocalDockerRegistryAuth retrieves the authentication token for the specified image from the local Docker config file. It returns the encoded authentication token if it contains any credentials, or an empty string if no credentials are found.

func WaitDaemonReady

func WaitDaemonReady(ctx context.Context, cli *client.Client) error

WaitDaemonReady waits for the Docker daemon to start and be ready to serve requests. TODO(lhf): convert into a Client method.

Types

type Client added in v0.13.0

type Client struct {
	*client.Client
}

func (*Client) CreateContainerWithImagePull added in v0.13.0

func (cli *Client) CreateContainerWithImagePull(
	ctx context.Context, name string, config *container.Config, hostConfig *container.HostConfig,
) (container.CreateResponse, error)

CreateContainerWithImagePull creates a container. If the image is missing, it pulls the image first.

func (*Client) PullImage added in v0.13.0

func (cli *Client) PullImage(
	ctx context.Context, image string, opts image.PullOptions,
) (<-chan PullPushImageMessage, error)

PullImage pulls an image and returns a channel to receive progress messages.

func (*Client) PushImage added in v0.13.0

func (cli *Client) PushImage(
	ctx context.Context, image string, opts image.PushOptions,
) (<-chan PullPushImageMessage, error)

PushImage pushes an image and returns a channel to receive progress messages.

func (*Client) WaitPortPublished added in v0.13.0

func (cli *Client) WaitPortPublished(ctx context.Context, containerID string, port nat.Port) ([]nat.PortBinding, error)

WaitPortPublished waits for a container port to be published on the host which happens asynchronously.

type PullPushImageMessage added in v0.13.0

type PullPushImageMessage struct {
	Message jsonmessage.JSONMessage
	Err     error
}

Jump to

Keyboard shortcuts

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