Versions in this module Expand all Collapse all v1 v1.0.14 Mar 8, 2023 v1.0.13 Mar 8, 2023 v1.0.12 Mar 6, 2023 v1.0.11 Mar 6, 2023 v1.0.10 Mar 6, 2023 v1.0.9 Mar 6, 2023 v1.0.8 Mar 6, 2023 v1.0.7 Mar 6, 2023 v1.0.6 Mar 3, 2023 v1.0.5 Mar 3, 2023 v1.0.4 Mar 3, 2023 v1.0.3 Mar 3, 2023 v1.0.2 Mar 3, 2023 v1.0.1 Mar 3, 2023 v1.0.0 Mar 3, 2023 Changes in this version + const APIVersion + var ErrConnectionRefused = errors.New("Cannot connect to the docker engine endpoint") + var ErrImageNotFound = errors.New("Image not found") + var ErrNotFound = errors.New("Not found") + func TLSConfigFromCertPath(path string) (*tls.Config, error) + type Actor struct + Attributes map[string]string + ID string + type AttachOptions struct + Logs bool + Stderr bool + Stdin bool + Stdout bool + Stream bool + type AuthConfig struct + Email string + Password string + RegistryToken string + Username string + type BlkioStatEntry struct + Major uint64 + Minor uint64 + Op string + Value uint64 + type BlkioStats struct + IoMergedRecursive []BlkioStatEntry + IoQueuedRecursive []BlkioStatEntry + IoServiceBytesRecursive []BlkioStatEntry + IoServiceTimeRecursive []BlkioStatEntry + IoServicedRecursive []BlkioStatEntry + IoTimeRecursive []BlkioStatEntry + IoWaitTimeRecursive []BlkioStatEntry + SectorsRecursive []BlkioStatEntry + type BuildImage struct + BuildArgs map[string]string + CgroupParent string + Config *ConfigFile + Context io.Reader + CpuPeriod int64 + CpuQuota int64 + CpuSetCpus string + CpuSetMems string + CpuShares int64 + DockerfileName string + ForceRemove bool + Labels map[string]string + Memory int64 + MemorySwap int64 + NoCache bool + Pull bool + RemoteURL string + Remove bool + RepoName string + SuppressOutput bool + type Callback func(*Event, chan error, ...interface{}) + type Client interface + AttachContainer func(id string, options *AttachOptions) (io.ReadCloser, error) + BuildImage func(image *BuildImage) (io.ReadCloser, error) + ConnectNetwork func(id, container string) error + ContainerChanges func(id string) ([]*ContainerChanges, error) + ContainerLogs func(id string, options *LogOptions) (io.ReadCloser, error) + ContainerStats func(id string, stopChan <-chan struct{}) (<-chan StatsOrError, error) + CreateContainer func(config *ContainerConfig, name string, authConfig *AuthConfig) (string, error) + CreateNetwork func(config *NetworkCreate) (*NetworkCreateResponse, error) + CreateVolume func(request *VolumeCreateRequest) (*Volume, error) + DisconnectNetwork func(id, container string, force bool) error + ExecCreate func(config *ExecConfig) (string, error) + ExecResize func(id string, width, height int) error + ExecStart func(id string, config *ExecConfig) error + ImportImage func(source string, repository string, tag string, tar io.Reader) (io.ReadCloser, error) + Info func() (*Info, error) + InspectContainer func(id string) (*ContainerInfo, error) + InspectImage func(id string) (*ImageInfo, error) + InspectNetwork func(id string) (*NetworkResource, error) + InspectService func(id string) (*ServiceResource, error) + KillContainer func(id, signal string) error + ListContainers func(all, size bool, filters string) ([]Container, error) + ListDanglingImages func() ([]*Image, error) + ListImages func(all bool) ([]*Image, error) + ListNetworks func(filters string) ([]*NetworkResource, error) + ListServices func() ([]*ServiceResource, error) + ListVolumes func() ([]*Volume, error) + LoadImage func(reader io.Reader) error + MonitorEvents func(options *MonitorEventsOptions, stopChan <-chan struct{}) (<-chan EventOrError, error) + PauseContainer func(name string) error + PullImage func(name string, auth *AuthConfig) error + PushImage func(name string, tag string, auth *AuthConfig) error + RemoveContainer func(id string, force, volumes bool) error + RemoveImage func(name string, force bool) ([]*ImageDelete, error) + RemoveNetwork func(id string) error + RemoveVolume func(name string) error + RenameContainer func(oldName string, newName string) error + RestartContainer func(id string, timeout int) error + SearchImages func(query, registry string, auth *AuthConfig) ([]ImageSearch, error) + StartContainer func(id string, config *HostConfig) error + StartMonitorEvents func(cb Callback, ec chan error, args ...interface{}) + StartMonitorStats func(id string, cb StatCallback, ec chan error, args ...interface{}) + StopAllMonitorEvents func() + StopAllMonitorStats func() + StopContainer func(id string, timeout int) error + TagImage func(nameOrID string, repo string, tag string, force bool) error + UnpauseContainer func(name string) error + Version func() (*Version, error) + Wait func(id string) <-chan WaitResult + type ConfigFile struct + Configs map[string]AuthConfig + type Container struct + Command string + Created int64 + Id string + Image string + Labels map[string]string + Names []string + NetworkSettings struct{ ... } + Ports []Port + SizeRootFs int64 + SizeRw int64 + Status string + type ContainerChanges struct + Kind int + Path string + type ContainerConfig struct + AttachStderr bool + AttachStdin bool + AttachStdout bool + Cmd []string + CpuShares int64 + Cpuset string + Domainname string + Entrypoint []string + Env []string + ExposedPorts map[string]struct{} + HostConfig HostConfig + Hostname string + Image string + Labels map[string]string + MacAddress string + Memory int64 + MemorySwap int64 + NetworkDisabled bool + NetworkingConfig NetworkingConfig + OnBuild []string + OpenStdin bool + PortSpecs []string + StdinOnce bool + StopSignal string + Tty bool + User string + VolumeDriver string + Volumes map[string]struct{} + WorkingDir string + type ContainerInfo struct + Args []string + Config *ContainerConfig + Created string + ExecIDs []string + HostConfig *HostConfig + Id string + Image string + LogPath string + Name string + NetworkSettings struct{ ... } + Path string + ResolvConfPath string + State *State + SysInitPath string + Volumes map[string]string + type CpuStats struct + CpuUsage CpuUsage + SystemUsage uint64 + ThrottlingData ThrottlingData + type CpuUsage struct + PercpuUsage []uint64 + TotalUsage uint64 + UsageInKernelmode uint64 + UsageInUsermode uint64 + type DeviceMapping struct + CgroupPermissions string + PathInContainer string + PathOnHost string + type DockerClient struct + HTTPClient *http.Client + TLSConfig *tls.Config + URL *url.URL + func NewDockerClient(daemonUrl string, tlsConfig *tls.Config) (*DockerClient, error) + func NewDockerClientTimeout(daemonUrl string, tlsConfig *tls.Config, timeout time.Duration, ...) (*DockerClient, error) + func (client *DockerClient) AttachContainer(id string, options *AttachOptions) (io.ReadCloser, error) + func (client *DockerClient) BuildImage(image *BuildImage) (io.ReadCloser, error) + func (client *DockerClient) ConnectNetwork(id, container string) error + func (client *DockerClient) ContainerChanges(id string) ([]*ContainerChanges, error) + func (client *DockerClient) ContainerLogs(id string, options *LogOptions) (io.ReadCloser, error) + func (client *DockerClient) ContainerStats(id string, stopChan <-chan struct{}) (<-chan StatsOrError, error) + func (client *DockerClient) CreateContainer(config *ContainerConfig, name string, auth *AuthConfig) (string, error) + func (client *DockerClient) CreateNetwork(config *NetworkCreate) (*NetworkCreateResponse, error) + func (client *DockerClient) CreateVolume(request *VolumeCreateRequest) (*Volume, error) + func (client *DockerClient) DisconnectNetwork(id, container string, force bool) error + func (client *DockerClient) ExecCreate(config *ExecConfig) (string, error) + func (client *DockerClient) ExecResize(id string, width, height int) error + func (client *DockerClient) ExecStart(id string, config *ExecConfig) error + func (client *DockerClient) GetContainerFiles(container, path string) (*http.Response, error) + func (client *DockerClient) GetImage(id string) (*http.Response, error) + func (client *DockerClient) GetImageHistory(id string) ([]ImageHistory, error) + func (client *DockerClient) ImportImage(source string, repository string, tag string, tar io.Reader) (io.ReadCloser, error) + func (client *DockerClient) Info() (*Info, error) + func (client *DockerClient) InspectContainer(id string) (*ContainerInfo, error) + func (client *DockerClient) InspectImage(id string) (*ImageInfo, error) + func (client *DockerClient) InspectNetwork(id string) (*NetworkResource, error) + func (client *DockerClient) InspectService(id string) (*ServiceResource, error) + func (client *DockerClient) KillContainer(id, signal string) error + func (client *DockerClient) ListContainers(all bool, size bool, filters string) ([]Container, error) + func (client *DockerClient) ListDanglingImages() ([]*Image, error) + func (client *DockerClient) ListImages(all bool) ([]*Image, error) + func (client *DockerClient) ListNetworks(filters string) ([]*NetworkResource, error) + func (client *DockerClient) ListServices() ([]*ServiceResource, error) + func (client *DockerClient) ListVolumes() ([]*Volume, error) + func (client *DockerClient) LoadImage(reader io.Reader) error + func (client *DockerClient) MonitorEvents(options *MonitorEventsOptions, stopChan <-chan struct{}) (<-chan EventOrError, error) + func (client *DockerClient) PauseContainer(id string) error + func (client *DockerClient) PullImage(name string, auth *AuthConfig) error + func (client *DockerClient) PushImage(name string, tag string, auth *AuthConfig) error + func (client *DockerClient) RemoveContainer(id string, force, volumes bool) error + func (client *DockerClient) RemoveImage(name string, force bool) ([]*ImageDelete, error) + func (client *DockerClient) RemoveNetwork(id string) error + func (client *DockerClient) RemoveVolume(name string) error + func (client *DockerClient) RenameContainer(oldName string, newName string) error + func (client *DockerClient) RestartContainer(id string, timeout int) error + func (client *DockerClient) SearchImages(query, registry string, auth *AuthConfig) ([]ImageSearch, error) + func (client *DockerClient) StartContainer(id string, config *HostConfig) error + func (client *DockerClient) StartMonitorEvents(cb Callback, ec chan error, args ...interface{}) + func (client *DockerClient) StartMonitorStats(id string, cb StatCallback, ec chan error, args ...interface{}) + func (client *DockerClient) StopAllMonitorEvents() + func (client *DockerClient) StopAllMonitorStats() + func (client *DockerClient) StopContainer(id string, timeout int) error + func (client *DockerClient) TagImage(nameOrID string, repo string, tag string, force bool) error + func (client *DockerClient) UnpauseContainer(id string) error + func (client *DockerClient) Version() (*Version, error) + func (client *DockerClient) Wait(id string) <-chan WaitResult + type EndpointIPAMConfig struct + IPv4Address string + IPv6Address string + type EndpointResource struct + EndpointID string + IPv4Address string + IPv6Address string + MacAddress string + Name string + type EndpointSettings struct + Aliases []string + EndpointID string + Gateway string + GlobalIPv6Address string + GlobalIPv6PrefixLen int + IPAMConfig *EndpointIPAMConfig + IPAddress string + IPPrefixLen int + IPv6Gateway string + Links []string + MacAddress string + NetworkID string + type Error struct + Status string + StatusCode int + func (e Error) Error() string + type Event struct + Action string + Actor Actor + From string + ID string + Status string + Time int64 + TimeNano int64 + Type string + type EventOrError struct + Error error + type ExecConfig struct + AttachStderr bool + AttachStdin bool + AttachStdout bool + Cmd []string + Container string + Detach bool + Tty bool + type HostConfig struct + Binds []string + BlkioDeviceReadBps []ThrottleDevice + BlkioDeviceReadIOps []ThrottleDevice + BlkioDeviceWriteBps []ThrottleDevice + BlkioDeviceWriteIOps []ThrottleDevice + BlkioWeight int64 + BlkioWeightDevice []WeightDevice + CapAdd []string + CapDrop []string + CgroupParent string + ConsoleSize [2]int + ContainerIDFile string + CpuPeriod int64 + CpuQuota int64 + CpuShares int64 + CpusetCpus string + CpusetMems string + DNSOptions []string + Devices []DeviceMapping + Dns []string + DnsSearch []string + ExtraHosts []string + GroupAdd []string + IpcMode string + KernelMemory int64 + Links []string + LogConfig LogConfig + LxcConf []map[string]string + Memory int64 + MemoryReservation int64 + MemorySwap int64 + MemorySwappiness int64 + NetworkMode string + OomKillDisable bool + OomScoreAdj int + PidMode string + PortBindings map[string][]PortBinding + Privileged bool + PublishAllPorts bool + ReadonlyRootfs bool + RestartPolicy RestartPolicy + SecurityOpt []string + ShmSize int64 + Tmpfs map[string]string + UTSMode string + Ulimits []Ulimit + VolumeDriver string + VolumesFrom []string + type IPAM struct + Config []IPAMConfig + Driver string + Options map[string]string + type IPAMConfig struct + AuxAddress map[string]string + Gateway string + IPRange string + Subnet string + type Image struct + Created int64 + Id string + Labels map[string]string + ParentId string + RepoDigests []string + RepoTags []string + Size int64 + VirtualSize int64 + type ImageDelete struct + Deleted string + Untagged string + type ImageHistory struct + Comment string + Created int64 + CreatedBy string + Id string + Size int64 + Tags []string + type ImageInfo struct + Architecture string + Author string + Comment string + Config *ContainerConfig + Container string + ContainerConfig *ContainerConfig + Created time.Time + DockerVersion string + Id string + Os string + Parent string + RepoDigests []string + RepoTags []string + RootFS *ImageRootFS + Size int64 + VirtualSize int64 + type ImageRootFS struct + Layers []string + Type string + type ImageSearch struct + Description string + IsAutomated bool + IsOfficial bool + Name string + StarCount int + type Info struct + BridgeNfIp6tables bool + BridgeNfIptables bool + Containers int64 + Debug interface{} + DockerRootDir string + Driver string + DriverStatus [][]string + ExecutionDriver string + HttpProxy string + HttpsProxy string + ID string + IPv4Forwarding interface{} + Images int64 + IndexServerAddress string + InitPath string + InitSha1 string + KernelVersion string + Labels []string + MemTotal int64 + MemoryLimit interface{} + NCPU int64 + NEventsListener int64 + NFd int64 + NGoroutines int64 + Name string + NoProxy string + OperatingSystem string + Registries interface{} + SwapLimit interface{} + SystemTime string + type LogConfig struct + Config map[string]string + Type string + type LogOptions struct + Follow bool + Stderr bool + Stdout bool + Tail int64 + Timestamps bool + type MemoryStats struct + Failcnt uint64 + Limit uint64 + MaxUsage uint64 + Stats map[string]uint64 + Usage uint64 + type MonitorEventsFilters struct + Container string + Containers []string + Event string + Events []string + Image string + Images []string + type MonitorEventsOptions struct + Filters *MonitorEventsFilters + Since int + Until int + type NetworkConnect struct + Container string + type NetworkCreate struct + CheckDuplicate bool + Driver string + IPAM IPAM + Internal bool + Labels map[string]string + Name string + Options map[string]string + type NetworkCreateResponse struct + ID string + Warning string + type NetworkDisconnect struct + Container string + Force bool + type NetworkResource struct + Containers map[string]EndpointResource + Driver string + ID string + IPAM IPAM + Labels map[string]string + Name string + Options map[string]string + Scope string + type NetworkStats struct + RxBytes uint64 + RxDropped uint64 + RxErrors uint64 + RxPackets uint64 + TxBytes uint64 + TxDropped uint64 + TxErrors uint64 + TxPackets uint64 + type NetworkingConfig struct + EndpointsConfig map[string]*EndpointSettings + type Port struct + IP string + PrivatePort int + PublicPort int + Type string + type PortBinding struct + HostIp string + HostPort string + type RespContainersCreate struct + Id string + Warnings []string + type RestartPolicy struct + MaximumRetryCount int64 + Name string + type ServiceResource struct + Endpoint struct{ ... } + ID string + Spec struct{ ... } + type ServiceVirtualIP struct + Addr string + NetworkID string + type StatCallback func(string, *Stats, chan error, ...interface{}) + type State struct + Dead bool + Error string + ExitCode int + FinishedAt time.Time + Ghost bool + OOMKilled bool + Paused bool + Pid int + Restarting bool + Running bool + StartedAt time.Time + func (s *State) StateString() string + func (s *State) String() string + type Stats struct + BlkioStats BlkioStats + CpuStats CpuStats + MemoryStats MemoryStats + NetworkStats NetworkStats + Read time.Time + type StatsOrError struct + Error error + type ThrottleDevice struct + Path string + Rate uint64 + type ThrottlingData struct + Periods uint64 + ThrottledPeriods uint64 + ThrottledTime uint64 + type Ulimit struct + Hard int64 + Name string + Soft int64 + type Version struct + ApiVersion string + Arch string + GitCommit string + GoVersion string + KernelVersion string + Os string + Version string + type Volume struct + Driver string + Labels map[string]string + Mountpoint string + Name string + type VolumeCreateRequest struct + Driver string + DriverOpts map[string]string + Labels map[string]string + Name string + type VolumesListResponse struct + Volumes []*Volume + type WaitResult struct + Error error + ExitCode int + type WeightDevice struct + Path string + Weight uint16