Documentation
¶
Overview ¶
Package docker provides a client for interacting with Docker and the Docker Hub registry API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDockerHubRepoTags ¶
GetDockerHubRepoTags returns all tags for the given docker hub repository. The resulting list gets sorted in ascending order. Currently, the default behavior is to only return tags that match the pattern \d+\.\d+.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the main docker client. It is used to create other clients.
func (*Client) Images ¶
func (c *Client) Images() ImageClient
Images returns a client for building, pushing, and removing Docker images.
func (*Client) Login ¶
Login logs in to the docker registry using the given auth config. It uses the docker CLI to login.
func (*Client) LoginFromEnv ¶
LoginFromEnv logs in to the docker registry using the environment variables DOCKER_USERNAME and DOCKER_PASSWORD. It calls the Login method internally.
type ErrorDetail ¶
type ErrorDetail struct {
Message string `json:"message"`
}
ErrorDetail holds detailed error information from Docker API responses.
type ErrorLine ¶
type ErrorLine struct {
Error string `json:"error"`
ErrorDetail ErrorDetail `json:"errorDetail"`
}
ErrorLine represents a single error line from Docker build/push output.
type ImageClient ¶
type ImageClient interface {
Build(ctx context.Context, buildDir string, tags ...string) (string, string, error)
Push(ctx context.Context, images ...string) error
Remove(ctx context.Context, ids ...string) error
}
ImageClient is a client for docker images. It is used to build, tag, push and remove docker images.