Documentation ¶
Index ¶
- Constants
- Variables
- func IsErrContainerNotFound(err error) bool
- func IsErrImageNotFound(err error) bool
- func IsErrNetworkNotFound(err error) bool
- func IsErrUnauthorized(err error) bool
- func IsErrVolumeNotFound(err error) bool
- func ParseHost(host string) (string, string, string, error)
- type APIClient
- type Client
- func (cli *Client) ClientVersion() string
- func (cli *Client) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
- func (cli *Client) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.ContainerCommitResponse, error)
- func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config, ...) (types.ContainerCreateResponse, error)
- func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]types.ContainerChange, error)
- func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error)
- func (cli *Client) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.ContainerExecCreateResponse, error)
- func (cli *Client) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
- func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
- func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error
- func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error)
- func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
- func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containerID string, getSize bool) (types.ContainerJSON, []byte, error)
- func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error
- func (cli *Client) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
- func (cli *Client) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error)
- func (cli *Client) ContainerPause(ctx context.Context, containerID string) error
- func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
- func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error
- func (cli *Client) ContainerResize(ctx context.Context, containerID string, options types.ResizeOptions) error
- func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout int) error
- func (cli *Client) ContainerStart(ctx context.Context, containerID string) error
- func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error)
- func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (io.ReadCloser, error)
- func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout int) error
- func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (types.ContainerProcessList, error)
- func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error
- func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) error
- func (cli *Client) ContainerWait(ctx context.Context, containerID string) (int, error)
- func (cli *Client) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
- func (cli *Client) CopyToContainer(ctx context.Context, container, path string, content io.Reader, ...) error
- func (cli *Client) Events(ctx context.Context, options types.EventsOptions) (io.ReadCloser, error)
- func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
- func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
- func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]types.ImageHistory, error)
- func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, ...) (io.ReadCloser, error)
- func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string, getSize bool) (types.ImageInspect, []byte, error)
- func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error)
- func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
- func (cli *Client) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
- func (cli *Client) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
- func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDelete, error)
- func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error)
- func (cli *Client) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error)
- func (cli *Client) ImageTag(ctx context.Context, imageID, ref string, options types.ImageTagOptions) error
- func (cli *Client) Info(ctx context.Context) (types.Info, error)
- func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, ...) error
- func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
- func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error
- func (cli *Client) NetworkInspect(ctx context.Context, networkID string) (types.NetworkResource, error)
- func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
- func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error
- func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (types.AuthResponse, error)
- func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error)
- func (cli *Client) UpdateClientVersion(v string)
- func (cli *Client) VolumeCreate(ctx context.Context, options types.VolumeCreateRequest) (types.Volume, error)
- func (cli *Client) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error)
- func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (types.VolumesListResponse, error)
- func (cli *Client) VolumeRemove(ctx context.Context, volumeID string) error
Constants ¶
const DefaultDockerHost = "unix:///var/run/docker.sock"
DefaultDockerHost defines os specific default if DOCKER_HOST is unset
Variables ¶
var ErrConnectionFailed = errors.New("Cannot connect to the Docker daemon. Is the docker daemon running on this host?")
ErrConnectionFailed is an error raised when the connection between the client and the server failed.
Functions ¶
func IsErrContainerNotFound ¶
IsErrContainerNotFound returns true if the error is caused when a container is not found in the docker host.
func IsErrImageNotFound ¶
IsErrImageNotFound returns true if the error is caused when an image is not found in the docker host.
func IsErrNetworkNotFound ¶
IsErrNetworkNotFound returns true if the error is caused when a network is not found in the docker host.
func IsErrUnauthorized ¶
IsErrUnauthorized returns true if the error is caused when a remote registry authentication fails
func IsErrVolumeNotFound ¶
IsErrVolumeNotFound returns true if the error is caused when a volume is not found in the docker host.
Types ¶
type APIClient ¶
type APIClient interface { ClientVersion() string ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.ContainerCommitResponse, error) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (types.ContainerCreateResponse, error) ContainerDiff(ctx context.Context, container string) ([]types.ContainerChange, error) ContainerExecAttach(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.ContainerExecCreateResponse, error) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error ContainerExport(ctx context.Context, container string) (io.ReadCloser, error) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error) ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error) ContainerKill(ctx context.Context, container, signal string) error ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) ContainerPause(ctx context.Context, container string) error ContainerRemove(ctx context.Context, container string, options types.ContainerRemoveOptions) error ContainerRename(ctx context.Context, container, newContainerName string) error ContainerResize(ctx context.Context, container string, options types.ResizeOptions) error ContainerRestart(ctx context.Context, container string, timeout int) error ContainerStatPath(ctx context.Context, container, path string) (types.ContainerPathStat, error) ContainerStats(ctx context.Context, container string, stream bool) (io.ReadCloser, error) ContainerStart(ctx context.Context, container string) error ContainerStop(ctx context.Context, container string, timeout int) error ContainerTop(ctx context.Context, container string, arguments []string) (types.ContainerProcessList, error) ContainerUnpause(ctx context.Context, container string) error ContainerUpdate(ctx context.Context, container string, updateConfig container.UpdateConfig) error ContainerWait(ctx context.Context, container string) (int, error) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error Events(ctx context.Context, options types.EventsOptions) (io.ReadCloser, error) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) ImageHistory(ctx context.Context, image string) ([]types.ImageHistory, error) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error) ImageInspectWithRaw(ctx context.Context, image string, getSize bool) (types.ImageInspect, []byte, error) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error) ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDelete, error) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) ImageSave(ctx context.Context, images []string) (io.ReadCloser, error) ImageTag(ctx context.Context, image, ref string, options types.ImageTagOptions) error Info(ctx context.Context) (types.Info, error) NetworkConnect(ctx context.Context, networkID, container string, config *network.EndpointSettings) error NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) NetworkDisconnect(ctx context.Context, networkID, container string, force bool) error NetworkInspect(ctx context.Context, networkID string) (types.NetworkResource, error) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) NetworkRemove(ctx context.Context, networkID string) error RegistryLogin(ctx context.Context, auth types.AuthConfig) (types.AuthResponse, error) ServerVersion(ctx context.Context) (types.Version, error) UpdateClientVersion(v string) VolumeCreate(ctx context.Context, options types.VolumeCreateRequest) (types.Volume, error) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error) VolumeList(ctx context.Context, filter filters.Args) (types.VolumesListResponse, error) VolumeRemove(ctx context.Context, volumeID string) error }
APIClient is an interface that clients that talk with a docker server must implement.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the API client that performs all operations against a docker server.
func NewClient ¶
func NewClient(host string, version string, client *http.Client, httpHeaders map[string]string) (*Client, error)
NewClient initializes a new API client for the given host and API version. It won't send any version information if the version number is empty. It uses the given http client as transport. It also initializes the custom http headers to add to each request.
func NewEnvClient ¶
NewEnvClient initializes a new API client based on environment variables. Use DOCKER_HOST to set the url to the docker server. Use DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest. Use DOCKER_CERT_PATH to load the tls certificates from. Use DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.
func (*Client) ClientVersion ¶
ClientVersion returns the version string associated with this instance of the Client. Note that this value can be changed via the DOCKER_API_VERSION env var.
func (*Client) ContainerAttach ¶
func (cli *Client) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
ContainerAttach attaches a connection to a container in the server. It returns a types.HijackedConnection with the hijacked connection and the a reader to get output. It's up to the called to close the hijacked connection by calling types.HijackedResponse.Close.
func (*Client) ContainerCommit ¶
func (cli *Client) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.ContainerCommitResponse, error)
ContainerCommit applies changes into a container and creates a new tagged image.
func (*Client) ContainerCreate ¶
func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (types.ContainerCreateResponse, error)
ContainerCreate creates a new container based in the given configuration. It can be associated with a name, but it's not mandatory.
func (*Client) ContainerDiff ¶
func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]types.ContainerChange, error)
ContainerDiff shows differences in a container filesystem since it was started.
func (*Client) ContainerExecAttach ¶
func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error)
ContainerExecAttach attaches a connection to an exec process in the server. It returns a types.HijackedConnection with the hijacked connection and the a reader to get output. It's up to the called to close the hijacked connection by calling types.HijackedResponse.Close.
func (*Client) ContainerExecCreate ¶
func (cli *Client) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.ContainerExecCreateResponse, error)
ContainerExecCreate creates a new exec configuration to run an exec process.
func (*Client) ContainerExecInspect ¶
func (cli *Client) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
ContainerExecInspect returns information about a specific exec process on the docker host.
func (*Client) ContainerExecResize ¶
func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
ContainerExecResize changes the size of the tty for an exec process running inside a container.
func (*Client) ContainerExecStart ¶
func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error
ContainerExecStart starts an exec process already created in the docker host.
func (*Client) ContainerExport ¶
ContainerExport retrieves the raw contents of a container and returns them as an io.ReadCloser. It's up to the caller to close the stream.
func (*Client) ContainerInspect ¶
func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
ContainerInspect returns the container information.
func (*Client) ContainerInspectWithRaw ¶
func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containerID string, getSize bool) (types.ContainerJSON, []byte, error)
ContainerInspectWithRaw returns the container information and it's raw representation.
func (*Client) ContainerKill ¶
ContainerKill terminates the container process but does not remove the container from the docker host.
func (*Client) ContainerList ¶
func (cli *Client) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
ContainerList returns the list of containers in the docker host.
func (*Client) ContainerLogs ¶
func (cli *Client) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error)
ContainerLogs returns the logs generated by a container in an io.ReadCloser. It's up to the caller to close the stream.
func (*Client) ContainerPause ¶
ContainerPause pauses the main process of a given container without terminating it.
func (*Client) ContainerRemove ¶
func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
ContainerRemove kills and removes a container from the docker host.
func (*Client) ContainerRename ¶
ContainerRename changes the name of a given container.
func (*Client) ContainerResize ¶
func (cli *Client) ContainerResize(ctx context.Context, containerID string, options types.ResizeOptions) error
ContainerResize changes the size of the tty for a container.
func (*Client) ContainerRestart ¶
ContainerRestart stops and starts a container again. It makes the daemon to wait for the container to be up again for a specific amount of time, given the timeout.
func (*Client) ContainerStart ¶
ContainerStart sends a request to the docker daemon to start a container.
func (*Client) ContainerStatPath ¶
func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error)
ContainerStatPath returns Stat information about a path inside the container filesystem.
func (*Client) ContainerStats ¶
func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (io.ReadCloser, error)
ContainerStats returns near realtime stats for a given container. It's up to the caller to close the io.ReadCloser returned.
func (*Client) ContainerStop ¶
ContainerStop stops a container without terminating the process. The process is blocked until the container stops or the timeout expires.
func (*Client) ContainerTop ¶
func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (types.ContainerProcessList, error)
ContainerTop shows process information from within a container.
func (*Client) ContainerUnpause ¶
ContainerUnpause resumes the process execution within a container
func (*Client) ContainerUpdate ¶
func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) error
ContainerUpdate updates resources of a container
func (*Client) ContainerWait ¶
ContainerWait pauses execution until a container exits. It returns the API status code as response of its readiness.
func (*Client) CopyFromContainer ¶
func (cli *Client) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
CopyFromContainer gets the content from the container and returns it as a Reader to manipulate it in the host. It's up to the caller to close the reader.
func (*Client) CopyToContainer ¶
func (cli *Client) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error
CopyToContainer copies content into the container filesystem.
func (*Client) Events ¶
func (cli *Client) Events(ctx context.Context, options types.EventsOptions) (io.ReadCloser, error)
Events returns a stream of events in the daemon in a ReadCloser. It's up to the caller to close the stream.
func (*Client) ImageBuild ¶
func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
ImageBuild sends request to the daemon to build images. The Body in the response implement an io.ReadCloser and it's up to the caller to close it.
func (*Client) ImageCreate ¶
func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
ImageCreate creates a new image based in the parent options. It returns the JSON content in the response body.
func (*Client) ImageHistory ¶
ImageHistory returns the changes in an image in history format.
func (*Client) ImageImport ¶
func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error)
ImageImport creates a new image based in the source options. It returns the JSON content in the response body.
func (*Client) ImageInspectWithRaw ¶
func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string, getSize bool) (types.ImageInspect, []byte, error)
ImageInspectWithRaw returns the image information and its raw representation.
func (*Client) ImageList ¶
func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error)
ImageList returns a list of images in the docker host.
func (*Client) ImageLoad ¶
func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
ImageLoad loads an image in the docker host from the client host. It's up to the caller to close the io.ReadCloser returned by this function.
func (*Client) ImagePull ¶
func (cli *Client) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
ImagePull requests the docker host to pull an image from a remote registry. It executes the privileged function if the operation is unauthorized and it tries one more time. It's up to the caller to handle the io.ReadCloser and close it properly.
FIXME(vdemeester): there is currently used in a few way in docker/docker - if not in trusted content, ref is used to pass the whole reference, and tag is empty - if in trusted content, ref is used to pass the reference name, and tag for the digest
func (*Client) ImagePush ¶
func (cli *Client) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
ImagePush requests the docker host to push an image to a remote registry. It executes the privileged function if the operation is unauthorized and it tries one more time. It's up to the caller to handle the io.ReadCloser and close it properly.
func (*Client) ImageRemove ¶
func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDelete, error)
ImageRemove removes an image from the docker host.
func (*Client) ImageSave ¶
ImageSave retrieves one or more images from the docker host as an io.ReadCloser. It's up to the caller to store the images and close the stream.
func (*Client) ImageSearch ¶
func (cli *Client) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error)
ImageSearch makes the docker host to search by a term in a remote registry. The list of results is not sorted in any fashion.
func (*Client) ImageTag ¶
func (cli *Client) ImageTag(ctx context.Context, imageID, ref string, options types.ImageTagOptions) error
ImageTag tags an image in the docker host
func (*Client) NetworkConnect ¶
func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, config *network.EndpointSettings) error
NetworkConnect connects a container to an existent network in the docker host.
func (*Client) NetworkCreate ¶
func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
NetworkCreate creates a new network in the docker host.
func (*Client) NetworkDisconnect ¶
func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error
NetworkDisconnect disconnects a container from an existent network in the docker host.
func (*Client) NetworkInspect ¶
func (cli *Client) NetworkInspect(ctx context.Context, networkID string) (types.NetworkResource, error)
NetworkInspect returns the information for a specific network configured in the docker host.
func (*Client) NetworkList ¶
func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
NetworkList returns the list of networks configured in the docker host.
func (*Client) NetworkRemove ¶
NetworkRemove removes an existent network from the docker host.
func (*Client) RegistryLogin ¶
func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (types.AuthResponse, error)
RegistryLogin authenticates the docker server with a given docker registry. It returns UnauthorizerError when the authentication fails.
func (*Client) ServerVersion ¶
ServerVersion returns information of the docker client and server host.
func (*Client) UpdateClientVersion ¶
UpdateClientVersion updates the version string associated with this instance of the Client.
func (*Client) VolumeCreate ¶
func (cli *Client) VolumeCreate(ctx context.Context, options types.VolumeCreateRequest) (types.Volume, error)
VolumeCreate creates a volume in the docker host.
func (*Client) VolumeInspect ¶
VolumeInspect returns the information about a specific volume in the docker host.
func (*Client) VolumeList ¶
func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (types.VolumesListResponse, error)
VolumeList returns the volumes configured in the docker host.
Source Files ¶
- client.go
- client_unix.go
- container_attach.go
- container_commit.go
- container_copy.go
- container_create.go
- container_diff.go
- container_exec.go
- container_export.go
- container_inspect.go
- container_kill.go
- container_list.go
- container_logs.go
- container_pause.go
- container_remove.go
- container_rename.go
- container_resize.go
- container_restart.go
- container_start.go
- container_stats.go
- container_stop.go
- container_top.go
- container_unpause.go
- container_update.go
- container_wait.go
- errors.go
- events.go
- hijack.go
- image_build.go
- image_create.go
- image_history.go
- image_import.go
- image_inspect.go
- image_list.go
- image_load.go
- image_pull.go
- image_push.go
- image_remove.go
- image_save.go
- image_search.go
- image_tag.go
- info.go
- interface.go
- login.go
- network_connect.go
- network_create.go
- network_disconnect.go
- network_inspect.go
- network_list.go
- network_remove.go
- request.go
- version.go
- volume_create.go
- volume_inspect.go
- volume_list.go
- volume_remove.go
Directories ¶
Path | Synopsis |
---|---|
Package transport provides function to send request to remote endpoints.
|
Package transport provides function to send request to remote endpoints. |
cancellable
Package cancellable provides helper function to cancel http requests.
|
Package cancellable provides helper function to cancel http requests. |