Documentation ¶
Overview ¶
Package daemon exposes the functions that occur on the host server that the Docker daemon is running.
In implementing the various functions of the daemon, there is often a method-specific struct for configuring the runtime behavior.
Index ¶
- Variables
- func CreateDaemonRoot(config *Config) error
- func GetConflictFreeLabels(labels []string) ([]string, error)
- func ModifyRootKeyLimit() error
- func ReloadConfiguration(configFile string, flags *pflag.FlagSet, reload func(*Config)) error
- func UsingSystemd(config *Config) bool
- func ValidateConfiguration(config *Config) error
- func VerifyCgroupDriver(config *Config) error
- type Cluster
- type CommonConfig
- type CommonTLSOptions
- type CommonUnixConfig
- type Config
- func (config *Config) GetAllRuntimes() map[string]types.Runtime
- func (config *Config) GetDefaultRuntimeName() string
- func (config *Config) GetExecRoot() string
- func (config *Config) GetInitPath() string
- func (config *Config) GetRuntime(name string) *types.Runtime
- func (config *Config) InstallCommonFlags(flags *pflag.FlagSet)
- func (config *Config) InstallCommonUnixFlags(flags *pflag.FlagSet)
- func (config *Config) InstallFlags(flags *pflag.FlagSet)
- func (config *Config) IsValueSet(name string) bool
- type Daemon
- func (daemon *Daemon) ActivateContainerServiceBinding(containerName string) error
- func (daemon *Daemon) AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error)
- func (daemon *Daemon) CheckpointCreate(name string, config types.CheckpointCreateOptions) error
- func (daemon *Daemon) CheckpointDelete(name string, config types.CheckpointDeleteOptions) error
- func (daemon *Daemon) CheckpointList(name string, config types.CheckpointListOptions) ([]types.Checkpoint, error)
- func (daemon *Daemon) Cleanup(container *container.Container)
- func (daemon *Daemon) Commit(name string, c *backend.ContainerCommitConfig) (string, error)
- func (daemon *Daemon) ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error
- func (daemon *Daemon) ConnectToNetwork(container *container.Container, idOrName string, ...) error
- func (daemon *Daemon) ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *types.ContainerPathStat, err error)
- func (daemon *Daemon) ContainerAttach(prefixOrName string, c *backend.ContainerAttachConfig) error
- func (daemon *Daemon) ContainerAttachRaw(prefixOrName string, stdin io.ReadCloser, stdout, stderr io.Writer, ...) error
- func (daemon *Daemon) ContainerChanges(name string) ([]archive.Change, error)
- func (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, error)
- func (daemon *Daemon) ContainerCreate(params types.ContainerCreateConfig, validateHostname bool) (containertypes.ContainerCreateCreatedBody, error)
- func (d *Daemon) ContainerExecCreate(name string, config *types.ExecConfig) (string, error)
- func (daemon *Daemon) ContainerExecInspect(id string) (*backend.ExecInspect, error)
- func (daemon *Daemon) ContainerExecResize(name string, height, width int) error
- func (d *Daemon) ContainerExecStart(ctx context.Context, name string, stdin io.ReadCloser, stdout io.Writer, ...) (err error)
- func (daemon *Daemon) ContainerExport(name string, out io.Writer) error
- func (daemon *Daemon) ContainerExtractToDir(name, path string, noOverwriteDirNonDir bool, content io.Reader) error
- func (daemon *Daemon) ContainerInspect(name string, size bool, version string) (interface{}, error)
- func (daemon *Daemon) ContainerInspectCurrent(name string, size bool) (*types.ContainerJSON, error)
- func (daemon *Daemon) ContainerKill(name string, sig uint64) error
- func (daemon *Daemon) ContainerLogs(ctx context.Context, containerName string, config *backend.ContainerLogsConfig, ...) error
- func (daemon *Daemon) ContainerPause(name string) error
- func (daemon *Daemon) ContainerRename(oldName, newName string) error
- func (daemon *Daemon) ContainerResize(name string, height, width int) error
- func (daemon *Daemon) ContainerRestart(name string, seconds *int) error
- func (daemon *Daemon) ContainerRm(name string, config *types.ContainerRmConfig) error
- func (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.HostConfig, validateHostname bool, ...) error
- func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error)
- func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, config *backend.ContainerStatsConfig) error
- func (daemon *Daemon) ContainerStop(name string, seconds *int) error
- func (daemon *Daemon) ContainerTop(name string, psArgs string) (*types.ContainerProcessList, error)
- func (daemon *Daemon) ContainerUnpause(name string) error
- func (daemon *Daemon) ContainerUpdate(name string, hostConfig *container.HostConfig, validateHostname bool) (container.ContainerUpdateOKBody, error)
- func (daemon *Daemon) ContainerUpdateCmdOnBuild(cID string, cmd []string) error
- func (daemon *Daemon) ContainerWait(name string, timeout time.Duration) (int, error)
- func (daemon *Daemon) ContainerWaitWithContext(ctx context.Context, name string) error
- func (daemon *Daemon) Containers(config *types.ContainerListOptions) ([]*types.Container, error)
- func (daemon *Daemon) ContainersPrune(config *types.ContainersPruneConfig) (*types.ContainersPruneReport, error)
- func (daemon *Daemon) CopyOnBuild(cID string, destPath string, src builder.FileInfo, decompress bool) error
- func (daemon *Daemon) CreateManagedContainer(params types.ContainerCreateConfig, validateHostname bool) (containertypes.ContainerCreateCreatedBody, error)
- func (daemon *Daemon) CreateManagedNetwork(create clustertypes.NetworkCreateRequest) error
- func (daemon *Daemon) CreateNetwork(create types.NetworkCreateRequest) (*types.NetworkCreateResponse, error)
- func (daemon *Daemon) DeactivateContainerServiceBinding(containerName string) error
- func (daemon *Daemon) DeleteManagedNetwork(networkID string) error
- func (daemon *Daemon) DeleteNetwork(networkID string) error
- func (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error
- func (daemon *Daemon) DisconnectFromNetwork(container *container.Container, networkName string, force bool) error
- func (d *Daemon) ExecExists(name string) (bool, error)
- func (daemon *Daemon) Exists(id string) bool
- func (daemon *Daemon) ExportImage(names []string, outStream io.Writer) error
- func (daemon *Daemon) FillPlatformInfo(v *types.Info, sysInfo *sysinfo.SysInfo)
- func (daemon *Daemon) FindNetwork(idName string) (libnetwork.Network, error)
- func (daemon *Daemon) ForceEndpointDelete(name string, networkName string) error
- func (daemon *Daemon) GetByName(name string) (*container.Container, error)
- func (daemon *Daemon) GetCluster() Cluster
- func (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, error)
- func (daemon *Daemon) GetContainerStats(container *container.Container) (*types.StatsJSON, error)
- func (daemon *Daemon) GetImage(refOrID string) (*image.Image, error)
- func (daemon *Daemon) GetImageID(refOrID string) (image.ID, error)
- func (daemon *Daemon) GetImageOnBuild(name string) (builder.Image, error)
- func (daemon *Daemon) GetNetworkByID(partialID string) (libnetwork.Network, error)
- func (daemon *Daemon) GetNetworkByName(name string) (libnetwork.Network, error)
- func (daemon *Daemon) GetNetworkDriverList() []string
- func (daemon *Daemon) GetNetworks() []libnetwork.Network
- func (daemon *Daemon) GetNetworksByID(partialID string) []libnetwork.Network
- func (daemon *Daemon) GetRemappedUIDGID() (int, int)
- func (daemon *Daemon) GetRepository(ctx context.Context, ref reference.NamedTagged, authConfig *types.AuthConfig) (dist.Repository, bool, error)
- func (daemon *Daemon) GetUIDGIDMaps() ([]idtools.IDMap, []idtools.IDMap)
- func (daemon *Daemon) GraphDriverName() string
- func (daemon *Daemon) HasExperimental() bool
- func (daemon *Daemon) ImageDelete(imageRef string, force, prune bool) ([]types.ImageDelete, error)
- func (daemon *Daemon) ImageHistory(name string) ([]*types.ImageHistory, error)
- func (daemon *Daemon) Images(imageFilters filters.Args, all bool, withExtraAttrs bool) ([]*types.ImageSummary, error)
- func (daemon *Daemon) ImagesPrune(config *types.ImagesPruneConfig) (*types.ImagesPruneReport, error)
- func (daemon *Daemon) ImportImage(src string, repository, tag string, msg string, inConfig io.ReadCloser, ...) error
- func (daemon *Daemon) IsPaused(id string) bool
- func (daemon *Daemon) IsShuttingDown() bool
- func (daemon *Daemon) IsSwarmCompatible() error
- func (daemon *Daemon) Kill(container *container.Container) error
- func (daemon *Daemon) List() []*container.Container
- func (daemon *Daemon) LoadImage(inTar io.ReadCloser, outStream io.Writer, quiet bool) error
- func (daemon *Daemon) LogContainerEvent(container *container.Container, action string)
- func (daemon *Daemon) LogContainerEventWithAttributes(container *container.Container, action string, attributes map[string]string)
- func (daemon *Daemon) LogDaemonEventWithAttributes(action string, attributes map[string]string)
- func (daemon *Daemon) LogImageEvent(imageID, refName, action string)
- func (daemon *Daemon) LogImageEventWithAttributes(imageID, refName, action string, attributes map[string]string)
- func (daemon *Daemon) LogNetworkEvent(nw libnetwork.Network, action string)
- func (daemon *Daemon) LogNetworkEventWithAttributes(nw libnetwork.Network, action string, attributes map[string]string)
- func (daemon *Daemon) LogPluginEvent(pluginID, refName, action string)
- func (daemon *Daemon) LogPluginEventWithAttributes(pluginID, refName, action string, attributes map[string]string)
- func (daemon *Daemon) LogVolumeEvent(volumeID, action string, attributes map[string]string)
- func (daemon *Daemon) LookupImage(name string) (*types.ImageInspect, error)
- func (daemon *Daemon) MakeImageCache(sourceRefs []string) builder.ImageCache
- func (daemon *Daemon) Map() map[image.ID]*image.Image
- func (daemon *Daemon) Mount(container *container.Container) error
- func (daemon *Daemon) NetworkControllerEnabled() bool
- func (daemon *Daemon) NetworksPrune(config *types.NetworksPruneConfig) (*types.NetworksPruneReport, error)
- func (daemon *Daemon) PullImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, ...) error
- func (daemon *Daemon) PullOnBuild(ctx context.Context, name string, authConfigs map[string]types.AuthConfig, ...) (builder.Image, error)
- func (daemon *Daemon) PushImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, ...) error
- func (daemon *Daemon) Register(c *container.Container) error
- func (daemon *Daemon) Reload(config *Config) (err error)
- func (daemon *Daemon) RestartSwarmContainers()
- func (daemon *Daemon) SearchRegistryForImages(ctx context.Context, filtersArgs string, term string, limit int, ...) (*registrytypes.SearchResults, error)
- func (daemon *Daemon) SetCluster(cluster Cluster)
- func (daemon *Daemon) SetClusterProvider(clusterProvider cluster.Provider)
- func (daemon *Daemon) SetContainerSecretReferences(name string, refs []*swarmtypes.SecretReference) error
- func (daemon *Daemon) SetContainerSecretStore(name string, store exec.SecretGetter) error
- func (daemon *Daemon) SetNetworkBootstrapKeys(keys []*networktypes.EncryptionKey) error
- func (daemon *Daemon) SetupIngress(create clustertypes.NetworkCreateRequest, nodeIP string) error
- func (daemon *Daemon) Shutdown() error
- func (daemon *Daemon) ShutdownTimeout() int
- func (daemon *Daemon) SquashImage(id, parent string) (string, error)
- func (daemon *Daemon) Start(container *container.Container) error
- func (daemon *Daemon) StateChanged(id string, e libcontainerd.StateInfo) error
- func (daemon *Daemon) SubscribeToEvents(since, until time.Time, filter filters.Args) ([]events.Message, chan interface{})
- func (daemon *Daemon) SystemDiskUsage() (*types.DiskUsage, error)
- func (daemon *Daemon) SystemInfo() (*types.Info, error)
- func (daemon *Daemon) SystemVersion() types.Version
- func (daemon *Daemon) TagImage(imageName, repository, tag string) error
- func (daemon *Daemon) TagImageWithReference(imageID image.ID, newTag reference.Named) error
- func (daemon *Daemon) Unmount(container *container.Container) error
- func (daemon *Daemon) UnsubscribeFromEvents(listener chan interface{})
- func (daemon *Daemon) UpdateAttachment(networkName, networkID, containerID string, config *network.NetworkingConfig) error
- func (daemon *Daemon) UpdateContainerServiceConfig(containerName string, serviceConfig *clustertypes.ServiceConfig) error
- func (daemon *Daemon) V4Subnets() []net.IPNet
- func (daemon *Daemon) V6Subnets() []net.IPNet
- func (daemon *Daemon) VolumeCreate(name, driverName string, opts, labels map[string]string) (*types.Volume, error)
- func (daemon *Daemon) VolumeInspect(name string) (*types.Volume, error)
- func (daemon *Daemon) VolumeRm(name string, force bool) error
- func (daemon *Daemon) Volumes(filter string) ([]*types.Volume, []string, error)
- func (daemon *Daemon) VolumesPrune(config *types.VolumesPruneConfig) (*types.VolumesPruneReport, error)
- func (daemon *Daemon) WaitForDetachment(ctx context.Context, networkName, networkID, taskID, containerID string) error
- type ErrImageDoesNotExist
- type LogConfig
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultRuntimeBinary is the default runtime to be used by // containerd if none is specified DefaultRuntimeBinary = "docker-runc" // DefaultInitBinary is the name of the default init binary DefaultInitBinary = "docker-init" )
var ErrExtractPointNotDirectory = errors.New("extraction point is not a directory")
ErrExtractPointNotDirectory is used to convey that the operation to extract a tar archive to a directory in a container has failed because the specified path does not refer to a directory.
var ( // ErrRootFSReadOnly is returned when a container // rootfs is marked readonly. ErrRootFSReadOnly = errors.New("container rootfs is marked read-only") )
var ( // ErrVolumeReadonly is used to signal an error when trying to copy data into // a volume mount that is not writable. ErrVolumeReadonly = errors.New("mounted volume is marked read-only") )
Functions ¶
func CreateDaemonRoot ¶ added in v1.13.0
CreateDaemonRoot creates the root for the daemon
func GetConflictFreeLabels ¶ added in v1.13.0
GetConflictFreeLabels validate Labels for conflict In swarm the duplicates for labels are removed so we only take same values here, no conflict values If the key-value is the same we will only take the last label
func ModifyRootKeyLimit ¶ added in v1.12.0
func ModifyRootKeyLimit() error
ModifyRootKeyLimit checks to see if the root key limit is set to at least 1000000 and changes it to that limit along with the maxbytes allocated to the keys at a 25 to 1 multiplier.
func ReloadConfiguration ¶ added in v1.10.0
ReloadConfiguration reads the configuration in the host and reloads the daemon and server.
func UsingSystemd ¶ added in v1.11.0
UsingSystemd returns true if cli option includes native.cgroupdriver=systemd
func ValidateConfiguration ¶ added in v1.12.0
ValidateConfiguration validates some specific configs. such as config.DNS, config.Labels, config.DNSSearch, as well as config.MaxConcurrentDownloads, config.MaxConcurrentUploads.
func VerifyCgroupDriver ¶ added in v1.11.0
VerifyCgroupDriver validates native.cgroupdriver
Types ¶
type Cluster ¶ added in v1.13.0
type Cluster interface { GetNetwork(input string) (apitypes.NetworkResource, error) GetNetworks() ([]apitypes.NetworkResource, error) RemoveNetwork(input string) error }
Cluster is the interface for github.com/docker/docker/daemon/cluster.(*Cluster).
type CommonConfig ¶ added in v1.7.0
type CommonConfig struct { AuthorizationPlugins []string `json:"authorization-plugins,omitempty"` // AuthorizationPlugins holds list of authorization plugins AutoRestart bool `json:"-"` Context map[string][]string `json:"-"` DisableBridge bool `json:"-"` DNS []string `json:"dns,omitempty"` DNSOptions []string `json:"dns-opts,omitempty"` DNSSearch []string `json:"dns-search,omitempty"` ExecOptions []string `json:"exec-opts,omitempty"` GraphDriver string `json:"storage-driver,omitempty"` GraphOptions []string `json:"storage-opts,omitempty"` Labels []string `json:"labels,omitempty"` Mtu int `json:"mtu,omitempty"` Pidfile string `json:"pidfile,omitempty"` RawLogs bool `json:"raw-logs,omitempty"` Root string `json:"graph,omitempty"` SocketGroup string `json:"group,omitempty"` TrustKeyPath string `json:"-"` CorsHeaders string `json:"api-cors-header,omitempty"` EnableCors bool `json:"api-enable-cors,omitempty"` // LiveRestoreEnabled determines whether we should keep containers // alive upon daemon shutdown/start LiveRestoreEnabled bool `json:"live-restore,omitempty"` // ClusterStore is the storage backend used for the cluster information. It is used by both // multihost networking (to store networks and endpoints information) and by the node discovery // mechanism. ClusterStore string `json:"cluster-store,omitempty"` // ClusterOpts is used to pass options to the discovery package for tuning libkv settings, such // as TLS configuration settings. ClusterOpts map[string]string `json:"cluster-store-opts,omitempty"` // ClusterAdvertise is the network endpoint that the Engine advertises for the purpose of node // discovery. This should be a 'host:port' combination on which that daemon instance is // reachable by other hosts. ClusterAdvertise string `json:"cluster-advertise,omitempty"` // MaxConcurrentDownloads is the maximum number of downloads that // may take place at a time for each pull. MaxConcurrentDownloads *int `json:"max-concurrent-downloads,omitempty"` // MaxConcurrentUploads is the maximum number of uploads that // may take place at a time for each push. MaxConcurrentUploads *int `json:"max-concurrent-uploads,omitempty"` // ShutdownTimeout is the timeout value (in seconds) the daemon will wait for the container // to stop when daemon is being shutdown ShutdownTimeout int `json:"shutdown-timeout,omitempty"` Debug bool `json:"debug,omitempty"` Hosts []string `json:"hosts,omitempty"` LogLevel string `json:"log-level,omitempty"` TLS bool `json:"tls,omitempty"` TLSVerify bool `json:"tlsverify,omitempty"` // Embedded structs that allow config // deserialization without the full struct. CommonTLSOptions // SwarmDefaultAdvertiseAddr is the default host/IP or network interface // to use if a wildcard address is specified in the ListenAddr value // given to the /swarm/init endpoint and no advertise address is // specified. SwarmDefaultAdvertiseAddr string `json:"swarm-default-advertise-addr"` MetricsAddress string `json:"metrics-addr"` LogConfig registry.ServiceOptions Experimental bool `json:"experimental"` // Experimental indicates whether experimental features should be exposed or not // contains filtered or unexported fields }
CommonConfig defines the configuration of a docker daemon which is common across platforms. It includes json tags to deserialize configuration from a file using the same names that the flags in the command line use.
type CommonTLSOptions ¶ added in v1.10.0
type CommonTLSOptions struct { CAFile string `json:"tlscacert,omitempty"` CertFile string `json:"tlscert,omitempty"` KeyFile string `json:"tlskey,omitempty"` }
CommonTLSOptions defines TLS configuration for the daemon server. It includes json tags to deserialize configuration from a file using the same names that the flags in the command line use.
type CommonUnixConfig ¶ added in v1.13.0
type CommonUnixConfig struct { ExecRoot string `json:"exec-root,omitempty"` ContainerdAddr string `json:"containerd,omitempty"` Runtimes map[string]types.Runtime `json:"runtimes,omitempty"` DefaultRuntime string `json:"default-runtime,omitempty"` }
CommonUnixConfig defines configuration of a docker daemon that is common across Unix platforms.
type Config ¶ added in v1.2.0
type Config struct { CommonConfig // These fields are common to all unix platforms. CommonUnixConfig // Fields below here are platform specific. CgroupParent string `json:"cgroup-parent,omitempty"` EnableSelinuxSupport bool `json:"selinux-enabled,omitempty"` RemappedRoot string `json:"userns-remap,omitempty"` Ulimits map[string]*units.Ulimit `json:"default-ulimits,omitempty"` CPURealtimePeriod int64 `json:"cpu-rt-period,omitempty"` CPURealtimeRuntime int64 `json:"cpu-rt-runtime,omitempty"` OOMScoreAdjust int `json:"oom-score-adjust,omitempty"` Init bool `json:"init,omitempty"` InitPath string `json:"init-path,omitempty"` SeccompProfile string `json:"seccomp-profile,omitempty"` }
Config defines the configuration of a docker daemon. It includes json tags to deserialize configuration from a file using the same names that the flags in the command line uses.
func MergeDaemonConfigurations ¶ added in v1.10.0
func MergeDaemonConfigurations(flagsConfig *Config, flags *pflag.FlagSet, configFile string) (*Config, error)
MergeDaemonConfigurations reads a configuration file, loads the file configuration in an isolated structure, and merges the configuration provided from flags on top if there are no conflicts.
func NewConfig ¶ added in v1.13.0
func NewConfig() *Config
NewConfig returns a new fully initialized Config struct
func (*Config) GetAllRuntimes ¶ added in v1.12.0
GetAllRuntimes returns a copy of the runtimes map
func (*Config) GetDefaultRuntimeName ¶ added in v1.12.0
GetDefaultRuntimeName returns the current default runtime
func (*Config) GetExecRoot ¶ added in v1.12.0
GetExecRoot returns the user configured Exec-root
func (*Config) GetInitPath ¶ added in v1.13.0
GetInitPath returns the configure docker-init path
func (*Config) GetRuntime ¶ added in v1.12.0
GetRuntime returns the runtime path and arguments for a given runtime name
func (*Config) InstallCommonFlags ¶ added in v1.7.0
InstallCommonFlags adds flags to the pflag.FlagSet to configure the daemon
func (*Config) InstallCommonUnixFlags ¶ added in v1.13.0
InstallCommonUnixFlags adds command-line options to the top-level flag parser for the current process that are common across Unix platforms.
func (*Config) InstallFlags ¶ added in v1.2.0
InstallFlags adds flags to the pflag.FlagSet to configure the daemon
func (*Config) IsValueSet ¶ added in v1.10.0
IsValueSet returns true if a configuration value was explicitly set in the configuration file.
type Daemon ¶
type Daemon struct { ID string RegistryService registry.Service EventsService *events.Events PluginStore *pluginstore.Store // contains filtered or unexported fields }
Daemon holds information about the Docker daemon.
func NewDaemon ¶
func NewDaemon(config *Config, registryService registry.Service, containerdRemote libcontainerd.Remote) (daemon *Daemon, err error)
NewDaemon sets up everything for the daemon to be able to service requests from the webserver.
func (*Daemon) ActivateContainerServiceBinding ¶ added in v1.13.0
ActivateContainerServiceBinding puts this container into load balancer active rotation and DNS response
func (*Daemon) AuthenticateToRegistry ¶ added in v1.9.0
func (daemon *Daemon) AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error)
AuthenticateToRegistry checks the validity of credentials in authConfig
func (*Daemon) CheckpointCreate ¶ added in v1.13.0
func (daemon *Daemon) CheckpointCreate(name string, config types.CheckpointCreateOptions) error
CheckpointCreate checkpoints the process running in a container with CRIU
func (*Daemon) CheckpointDelete ¶ added in v1.13.0
func (daemon *Daemon) CheckpointDelete(name string, config types.CheckpointDeleteOptions) error
CheckpointDelete deletes the specified checkpoint
func (*Daemon) CheckpointList ¶ added in v1.13.0
func (daemon *Daemon) CheckpointList(name string, config types.CheckpointListOptions) ([]types.Checkpoint, error)
CheckpointList lists all checkpoints of the specified container
func (*Daemon) Cleanup ¶ added in v1.10.0
Cleanup releases any network resources allocated to the container along with any rules around how containers are linked together. It also unmounts the container's root filesystem.
func (*Daemon) Commit ¶
Commit creates a new filesystem image from the current state of a container. The image can optionally be tagged into a repository.
func (*Daemon) ConnectContainerToNetwork ¶ added in v1.10.0
func (daemon *Daemon) ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error
ConnectContainerToNetwork connects the given container to the given network. If either cannot be found, an err is returned. If the network cannot be set up, an err is returned.
func (*Daemon) ConnectToNetwork ¶ added in v1.10.0
func (daemon *Daemon) ConnectToNetwork(container *container.Container, idOrName string, endpointConfig *networktypes.EndpointSettings) error
ConnectToNetwork connects a container to a network
func (*Daemon) ContainerArchivePath ¶ added in v1.8.0
func (daemon *Daemon) ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *types.ContainerPathStat, err error)
ContainerArchivePath creates an archive of the filesystem resource at the specified path in the container identified by the given name. Returns a tar archive of the resource and whether it was a directory or a single file.
func (*Daemon) ContainerAttach ¶ added in v1.2.0
func (daemon *Daemon) ContainerAttach(prefixOrName string, c *backend.ContainerAttachConfig) error
ContainerAttach attaches to logs according to the config passed in. See ContainerAttachConfig.
func (*Daemon) ContainerAttachRaw ¶ added in v1.11.0
func (daemon *Daemon) ContainerAttachRaw(prefixOrName string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error
ContainerAttachRaw attaches the provided streams to the container's stdio
func (*Daemon) ContainerChanges ¶ added in v1.2.0
ContainerChanges returns a list of container fs changes
func (*Daemon) ContainerCopy ¶ added in v1.2.0
ContainerCopy performs a deprecated operation of archiving the resource at the specified path in the container identified by the given name.
func (*Daemon) ContainerCreate ¶ added in v1.2.0
func (daemon *Daemon) ContainerCreate(params types.ContainerCreateConfig, validateHostname bool) (containertypes.ContainerCreateCreatedBody, error)
ContainerCreate creates a regular container
func (*Daemon) ContainerExecCreate ¶ added in v1.3.0
ContainerExecCreate sets up an exec in a running container.
func (*Daemon) ContainerExecInspect ¶ added in v1.4.0
func (daemon *Daemon) ContainerExecInspect(id string) (*backend.ExecInspect, error)
ContainerExecInspect returns low-level information about the exec command. An error is returned if the exec cannot be found.
func (*Daemon) ContainerExecResize ¶ added in v1.3.0
ContainerExecResize changes the size of the TTY of the process running in the exec with the given name to the given height and width.
func (*Daemon) ContainerExecStart ¶ added in v1.3.0
func (d *Daemon) ContainerExecStart(ctx context.Context, name string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) (err error)
ContainerExecStart starts a previously set up exec instance. The std streams are set up. If ctx is cancelled, the process is terminated.
func (*Daemon) ContainerExport ¶ added in v1.2.0
ContainerExport writes the contents of the container to the given writer. An error is returned if the container cannot be found.
func (*Daemon) ContainerExtractToDir ¶ added in v1.8.0
func (daemon *Daemon) ContainerExtractToDir(name, path string, noOverwriteDirNonDir bool, content io.Reader) error
ContainerExtractToDir extracts the given archive to the specified location in the filesystem of the container identified by the given name. The given path must be of a directory in the container. If it is not, the error will be ErrExtractPointNotDirectory. If noOverwriteDirNonDir is true then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa.
func (*Daemon) ContainerInspect ¶ added in v0.12.0
ContainerInspect returns low-level information about a container. Returns an error if the container cannot be found, or if there is an error getting the data.
func (*Daemon) ContainerInspectCurrent ¶ added in v1.12.0
ContainerInspectCurrent returns low-level information about a container in a most recent api version.
func (*Daemon) ContainerKill ¶ added in v1.2.0
ContainerKill sends signal to the container If no signal is given (sig 0), then Kill with SIGKILL and wait for the container to exit. If a signal is given, then just send it to the container and return.
func (*Daemon) ContainerLogs ¶ added in v1.2.0
func (daemon *Daemon) ContainerLogs(ctx context.Context, containerName string, config *backend.ContainerLogsConfig, started chan struct{}) error
ContainerLogs hooks up a container's stdout and stderr streams configured with the given struct.
func (*Daemon) ContainerPause ¶ added in v1.2.0
ContainerPause pauses a container
func (*Daemon) ContainerRename ¶ added in v1.5.0
ContainerRename changes the name of a container, using the oldName to find the container. An error is returned if newName is already reserved.
func (*Daemon) ContainerResize ¶ added in v1.2.0
ContainerResize changes the size of the TTY of the process running in the container with the given name to the given height and width.
func (*Daemon) ContainerRestart ¶ added in v1.2.0
ContainerRestart stops and starts a container. It attempts to gracefully stop the container within the given timeout, forcefully stopping it if the timeout is exceeded. If given a negative timeout, ContainerRestart will wait forever until a graceful stop. Returns an error if the container cannot be found, or if there is an underlying error at any stage of the restart.
func (*Daemon) ContainerRm ¶ added in v1.3.0
func (daemon *Daemon) ContainerRm(name string, config *types.ContainerRmConfig) error
ContainerRm removes the container id from the filesystem. An error is returned if the container is not found, or if the remove fails. If the remove succeeds, the container name is released, and network links are removed.
func (*Daemon) ContainerStart ¶ added in v1.2.0
func (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.HostConfig, validateHostname bool, checkpoint string, checkpointDir string) error
ContainerStart starts a container.
func (*Daemon) ContainerStatPath ¶ added in v1.8.0
func (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error)
ContainerStatPath stats the filesystem resource at the specified path in the container identified by the given name.
func (*Daemon) ContainerStats ¶ added in v1.5.0
func (daemon *Daemon) ContainerStats(ctx context.Context, prefixOrName string, config *backend.ContainerStatsConfig) error
ContainerStats writes information about the container to the stream given in the config object.
func (*Daemon) ContainerStop ¶ added in v1.2.0
ContainerStop looks for the given container and terminates it, waiting the given number of seconds before forcefully killing the container. If a negative number of seconds is given, ContainerStop will wait for a graceful termination. An error is returned if the container is not found, is already stopped, or if there is a problem stopping the container.
func (*Daemon) ContainerTop ¶ added in v1.2.0
ContainerTop lists the processes running inside of the given container by calling ps with the given args, or with the flags "-ef" if no args are given. An error is returned if the container is not found, or is not running, or if there are any problems running ps, or parsing the output.
func (*Daemon) ContainerUnpause ¶ added in v1.2.0
ContainerUnpause unpauses a container
func (*Daemon) ContainerUpdate ¶ added in v1.10.0
func (daemon *Daemon) ContainerUpdate(name string, hostConfig *container.HostConfig, validateHostname bool) (container.ContainerUpdateOKBody, error)
ContainerUpdate updates configuration of the container
func (*Daemon) ContainerUpdateCmdOnBuild ¶ added in v1.11.0
ContainerUpdateCmdOnBuild updates Path and Args for the container with ID cID.
func (*Daemon) ContainerWait ¶ added in v1.2.0
ContainerWait stops processing until the given container is stopped. If the container is not found, an error is returned. On a successful stop, the exit code of the container is returned. On a timeout, an error is returned. If you want to wait forever, supply a negative duration for the timeout.
func (*Daemon) ContainerWaitWithContext ¶ added in v1.12.0
ContainerWaitWithContext returns a channel where exit code is sent when container stops. Channel can be cancelled with a context.
func (*Daemon) Containers ¶ added in v1.2.0
Containers returns the list of containers to show given the user's filtering.
func (*Daemon) ContainersPrune ¶ added in v1.13.0
func (daemon *Daemon) ContainersPrune(config *types.ContainersPruneConfig) (*types.ContainersPruneReport, error)
ContainersPrune removes unused containers
func (*Daemon) CopyOnBuild ¶ added in v1.11.0
func (daemon *Daemon) CopyOnBuild(cID string, destPath string, src builder.FileInfo, decompress bool) error
CopyOnBuild copies/extracts a source FileInfo to a destination path inside a container specified by a container object. TODO: make sure callers don't unnecessarily convert destPath with filepath.FromSlash (Copy does it already). CopyOnBuild should take in abstract paths (with slashes) and the implementation should convert it to OS-specific paths.
func (*Daemon) CreateManagedContainer ¶ added in v1.12.0
func (daemon *Daemon) CreateManagedContainer(params types.ContainerCreateConfig, validateHostname bool) (containertypes.ContainerCreateCreatedBody, error)
CreateManagedContainer creates a container that is managed by a Service
func (*Daemon) CreateManagedNetwork ¶ added in v1.12.0
func (daemon *Daemon) CreateManagedNetwork(create clustertypes.NetworkCreateRequest) error
CreateManagedNetwork creates an agent network.
func (*Daemon) CreateNetwork ¶ added in v1.9.0
func (daemon *Daemon) CreateNetwork(create types.NetworkCreateRequest) (*types.NetworkCreateResponse, error)
CreateNetwork creates a network with the given name, driver and other optional parameters
func (*Daemon) DeactivateContainerServiceBinding ¶ added in v1.13.0
DeactivateContainerServiceBinding remove this container fromload balancer active rotation, and DNS response
func (*Daemon) DeleteManagedNetwork ¶ added in v1.12.0
DeleteManagedNetwork deletes an agent network.
func (*Daemon) DeleteNetwork ¶ added in v1.10.0
DeleteNetwork destroys a network unless it's one of docker's predefined networks.
func (*Daemon) DisconnectContainerFromNetwork ¶ added in v1.10.0
func (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error
DisconnectContainerFromNetwork disconnects the given container from the given network. If either cannot be found, an err is returned.
func (*Daemon) DisconnectFromNetwork ¶ added in v1.10.0
func (daemon *Daemon) DisconnectFromNetwork(container *container.Container, networkName string, force bool) error
DisconnectFromNetwork disconnects container from network n.
func (*Daemon) ExecExists ¶ added in v1.9.0
ExecExists looks up the exec instance and returns a bool if it exists or not. It will also return the error produced by `getConfig`
func (*Daemon) Exists ¶
Exists returns a true if a container of the specified ID or name exists, false otherwise.
func (*Daemon) ExportImage ¶ added in v1.9.0
ExportImage exports a list of images to the given output stream. The exported images are archived into a tar when written to the output stream. All images with the given tag and all versions containing the same tag are exported. names is the set of tags to export, and outStream is the writer which the images are written to.
func (*Daemon) FillPlatformInfo ¶ added in v1.13.0
FillPlatformInfo fills the platform related info.
func (*Daemon) FindNetwork ¶ added in v1.9.0
func (daemon *Daemon) FindNetwork(idName string) (libnetwork.Network, error)
FindNetwork function finds a network for a given string that can represent network name or id
func (*Daemon) ForceEndpointDelete ¶ added in v1.10.0
ForceEndpointDelete deletes an endpoint from a network forcefully
func (*Daemon) GetCluster ¶ added in v1.13.0
GetCluster returns the cluster
func (*Daemon) GetContainer ¶ added in v1.10.0
GetContainer looks for a container using the provided information, which could be one of the following inputs from the caller:
- A full container ID, which will exact match a container in daemon's list
- A container name, which will only exact match via the GetByName() function
- A partial container ID prefix (e.g. short ID) of any length that is unique enough to only return a single container object If none of these searches succeed, an error is returned
func (*Daemon) GetContainerStats ¶ added in v1.10.0
GetContainerStats collects all the stats published by a container
func (*Daemon) GetImage ¶ added in v1.9.0
GetImage returns an image corresponding to the image referred to by refOrID.
func (*Daemon) GetImageID ¶ added in v1.10.0
GetImageID returns an image ID corresponding to the image referred to by refOrID.
func (*Daemon) GetImageOnBuild ¶ added in v1.11.0
GetImageOnBuild looks up a Docker image referenced by `name`.
func (*Daemon) GetNetworkByID ¶ added in v1.11.0
func (daemon *Daemon) GetNetworkByID(partialID string) (libnetwork.Network, error)
GetNetworkByID function returns a network whose ID begins with the given prefix. It fails with an error if no matching, or more than one matching, networks are found.
func (*Daemon) GetNetworkByName ¶ added in v1.11.0
func (daemon *Daemon) GetNetworkByName(name string) (libnetwork.Network, error)
GetNetworkByName function returns a network for a given network name. If no network name is given, the default network is returned.
func (*Daemon) GetNetworkDriverList ¶ added in v1.10.0
GetNetworkDriverList returns the list of plugins drivers registered for network.
func (*Daemon) GetNetworks ¶ added in v1.12.0
func (daemon *Daemon) GetNetworks() []libnetwork.Network
GetNetworks returns a list of all networks
func (*Daemon) GetNetworksByID ¶ added in v1.9.0
func (daemon *Daemon) GetNetworksByID(partialID string) []libnetwork.Network
GetNetworksByID returns a list of networks whose ID partially matches zero or more networks
func (*Daemon) GetRemappedUIDGID ¶ added in v1.9.0
GetRemappedUIDGID returns the current daemon's uid and gid values if user namespaces are in use for this daemon instance. If not this function will return "real" root values of 0, 0.
func (*Daemon) GetRepository ¶ added in v1.13.0
func (daemon *Daemon) GetRepository(ctx context.Context, ref reference.NamedTagged, authConfig *types.AuthConfig) (dist.Repository, bool, error)
GetRepository returns a repository from the registry.
func (*Daemon) GetUIDGIDMaps ¶ added in v1.9.0
GetUIDGIDMaps returns the current daemon's user namespace settings for the full uid and gid maps which will be applied to containers started in this instance.
func (*Daemon) GraphDriverName ¶ added in v1.10.0
GraphDriverName returns the name of the graph driver used by the layer.Store
func (*Daemon) HasExperimental ¶ added in v1.13.0
HasExperimental returns whether the experimental features of the daemon are enabled or not
func (*Daemon) ImageDelete ¶ added in v1.2.0
ImageDelete deletes the image referenced by the given imageRef from this daemon. The given imageRef can be an image ID, ID prefix, or a repository reference (with an optional tag or digest, defaulting to the tag name "latest"). There is differing behavior depending on whether the given imageRef is a repository reference or not.
If the given imageRef is a repository reference then that repository reference will be removed. However, if there exists any containers which were created using the same image reference then the repository reference cannot be removed unless either there are other repository references to the same image or force is true. Following removal of the repository reference, the referenced image itself will attempt to be deleted as described below but quietly, meaning any image delete conflicts will cause the image to not be deleted and the conflict will not be reported.
There may be conflicts preventing deletion of an image and these conflicts are divided into two categories grouped by their severity:
Hard Conflict:
- a pull or build using the image.
- any descendant image.
- any running container using the image.
Soft Conflict:
- any stopped container using the image.
- any repository tag or digest references to the image.
The image cannot be removed if there are any hard conflicts and can be removed if there are soft conflicts only if force is true.
If prune is true, ancestor images will each attempt to be deleted quietly, meaning any delete conflicts will cause the image to not be deleted and the conflict will not be reported.
FIXME: remove ImageDelete's dependency on Daemon, then move to the graph package. This would require that we no longer need the daemon to determine whether images are being used by a stopped or running container.
func (*Daemon) ImageHistory ¶ added in v1.9.0
func (daemon *Daemon) ImageHistory(name string) ([]*types.ImageHistory, error)
ImageHistory returns a slice of ImageHistory structures for the specified image name by walking the image lineage.
func (*Daemon) Images ¶ added in v1.10.0
func (daemon *Daemon) Images(imageFilters filters.Args, all bool, withExtraAttrs bool) ([]*types.ImageSummary, error)
Images returns a filtered list of images. filterArgs is a JSON-encoded set of filter arguments which will be interpreted by api/types/filters. filter is a shell glob string applied to repository names. The argument named all controls whether all images in the graph are filtered, or just the heads.
func (*Daemon) ImagesPrune ¶ added in v1.13.0
func (daemon *Daemon) ImagesPrune(config *types.ImagesPruneConfig) (*types.ImagesPruneReport, error)
ImagesPrune removes unused images
func (*Daemon) ImportImage ¶ added in v1.9.0
func (daemon *Daemon) ImportImage(src string, repository, tag string, msg string, inConfig io.ReadCloser, outStream io.Writer, changes []string) error
ImportImage imports an image, getting the archived layer data either from inConfig (if src is "-"), or from a URI specified in src. Progress output is written to outStream. Repository and tag names can optionally be given in the repo and tag arguments, respectively.
func (*Daemon) IsPaused ¶ added in v1.10.0
IsPaused returns a bool indicating if the specified container is paused.
func (*Daemon) IsShuttingDown ¶ added in v1.10.0
IsShuttingDown tells whether the daemon is shutting down or not
func (*Daemon) IsSwarmCompatible ¶ added in v1.12.0
IsSwarmCompatible verifies if the current daemon configuration is compatible with the swarm mode
func (*Daemon) LoadImage ¶ added in v1.9.0
LoadImage uploads a set of images into the repository. This is the complement of ImageExport. The input stream is an uncompressed tar ball containing images and metadata.
func (*Daemon) LogContainerEvent ¶ added in v1.10.0
LogContainerEvent generates an event related to a container with only the default attributes.
func (*Daemon) LogContainerEventWithAttributes ¶ added in v1.11.0
func (daemon *Daemon) LogContainerEventWithAttributes(container *container.Container, action string, attributes map[string]string)
LogContainerEventWithAttributes generates an event related to a container with specific given attributes.
func (*Daemon) LogDaemonEventWithAttributes ¶ added in v1.12.0
LogDaemonEventWithAttributes generates an event related to the daemon itself with specific given attributes.
func (*Daemon) LogImageEvent ¶ added in v1.10.0
LogImageEvent generates an event related to an image with only the default attributes.
func (*Daemon) LogImageEventWithAttributes ¶ added in v1.11.0
func (daemon *Daemon) LogImageEventWithAttributes(imageID, refName, action string, attributes map[string]string)
LogImageEventWithAttributes generates an event related to an image with specific given attributes.
func (*Daemon) LogNetworkEvent ¶ added in v1.10.0
func (daemon *Daemon) LogNetworkEvent(nw libnetwork.Network, action string)
LogNetworkEvent generates an event related to a network with only the default attributes.
func (*Daemon) LogNetworkEventWithAttributes ¶ added in v1.10.0
func (daemon *Daemon) LogNetworkEventWithAttributes(nw libnetwork.Network, action string, attributes map[string]string)
LogNetworkEventWithAttributes generates an event related to a network with specific given attributes.
func (*Daemon) LogPluginEvent ¶ added in v1.12.1
LogPluginEvent generates an event related to a plugin with only the default attributes.
func (*Daemon) LogPluginEventWithAttributes ¶ added in v1.12.1
func (daemon *Daemon) LogPluginEventWithAttributes(pluginID, refName, action string, attributes map[string]string)
LogPluginEventWithAttributes generates an event related to a plugin with specific given attributes.
func (*Daemon) LogVolumeEvent ¶ added in v1.10.0
LogVolumeEvent generates an event related to a volume.
func (*Daemon) LookupImage ¶ added in v1.9.0
func (daemon *Daemon) LookupImage(name string) (*types.ImageInspect, error)
LookupImage looks up an image by name and returns it as an ImageInspect structure.
func (*Daemon) MakeImageCache ¶ added in v1.13.0
func (daemon *Daemon) MakeImageCache(sourceRefs []string) builder.ImageCache
MakeImageCache creates a stateful image cache.
func (*Daemon) NetworkControllerEnabled ¶ added in v1.9.0
NetworkControllerEnabled checks if the networking stack is enabled. This feature depends on OS primitives and it's disabled in systems like Windows.
func (*Daemon) NetworksPrune ¶ added in v1.13.0
func (daemon *Daemon) NetworksPrune(config *types.NetworksPruneConfig) (*types.NetworksPruneReport, error)
NetworksPrune removes unused networks
func (*Daemon) PullImage ¶ added in v1.9.0
func (daemon *Daemon) PullImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error
PullImage initiates a pull operation. image is the repository name to pull, and tag may be either empty, or indicate a specific tag to pull.
func (*Daemon) PullOnBuild ¶ added in v1.11.0
func (daemon *Daemon) PullOnBuild(ctx context.Context, name string, authConfigs map[string]types.AuthConfig, output io.Writer) (builder.Image, error)
PullOnBuild tells Docker to pull image referenced by `name`.
func (*Daemon) PushImage ¶ added in v1.9.0
func (daemon *Daemon) PushImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error
PushImage initiates a push operation on the repository named localName.
func (*Daemon) Reload ¶ added in v1.10.0
Reload reads configuration changes and modifies the daemon according to those changes. These are the settings that Reload changes: - Daemon labels. - Daemon debug log level. - Daemon insecure registries. - Daemon max concurrent downloads - Daemon max concurrent uploads - Cluster discovery (reconfigure and restart). - Daemon live restore - Daemon shutdown timeout (in seconds).
func (*Daemon) RestartSwarmContainers ¶ added in v1.13.0
func (daemon *Daemon) RestartSwarmContainers()
RestartSwarmContainers restarts any autostart container which has a swarm endpoint.
func (*Daemon) SearchRegistryForImages ¶ added in v1.9.0
func (daemon *Daemon) SearchRegistryForImages(ctx context.Context, filtersArgs string, term string, limit int, authConfig *types.AuthConfig, headers map[string][]string) (*registrytypes.SearchResults, error)
SearchRegistryForImages queries the registry for images matching term. authConfig is used to login.
func (*Daemon) SetCluster ¶ added in v1.13.0
SetCluster sets the cluster
func (*Daemon) SetClusterProvider ¶ added in v1.12.0
SetClusterProvider sets a component for querying the current cluster state.
func (*Daemon) SetContainerSecretReferences ¶ added in v1.13.0
func (daemon *Daemon) SetContainerSecretReferences(name string, refs []*swarmtypes.SecretReference) error
SetContainerSecretReferences sets the container secret references needed
func (*Daemon) SetContainerSecretStore ¶ added in v1.13.0
func (daemon *Daemon) SetContainerSecretStore(name string, store exec.SecretGetter) error
SetContainerSecretStore sets the secret store backend for the container
func (*Daemon) SetNetworkBootstrapKeys ¶ added in v1.12.0
func (daemon *Daemon) SetNetworkBootstrapKeys(keys []*networktypes.EncryptionKey) error
SetNetworkBootstrapKeys sets the bootstrap keys.
func (*Daemon) SetupIngress ¶ added in v1.12.0
func (daemon *Daemon) SetupIngress(create clustertypes.NetworkCreateRequest, nodeIP string) error
SetupIngress setups ingress networking.
func (*Daemon) ShutdownTimeout ¶ added in v1.13.0
ShutdownTimeout returns the shutdown timeout based on the max stopTimeout of the containers, and is limited by daemon's ShutdownTimeout.
func (*Daemon) SquashImage ¶ added in v1.13.0
SquashImage creates a new image with the diff of the specified image and the specified parent. This new image contains only the layers from it's parent + 1 extra layer which contains the diff of all the layers in between. The existing image(s) is not destroyed. If no parent is specified, a new image with the diff of all the specified image's layers merged into a new layer that has no parents.
func (*Daemon) StateChanged ¶ added in v1.11.0
func (daemon *Daemon) StateChanged(id string, e libcontainerd.StateInfo) error
StateChanged updates daemon state changes from containerd
func (*Daemon) SubscribeToEvents ¶ added in v1.10.0
func (daemon *Daemon) SubscribeToEvents(since, until time.Time, filter filters.Args) ([]events.Message, chan interface{})
SubscribeToEvents returns the currently record of events, a channel to stream new events from, and a function to cancel the stream of events.
func (*Daemon) SystemDiskUsage ¶ added in v1.13.0
SystemDiskUsage returns information about the daemon data disk usage
func (*Daemon) SystemInfo ¶ added in v1.7.0
SystemInfo returns information about the host server the daemon is running on.
func (*Daemon) SystemVersion ¶ added in v1.10.0
SystemVersion returns version information about the daemon.
func (*Daemon) TagImage ¶ added in v1.9.0
TagImage creates the tag specified by newTag, pointing to the image named imageName (alternatively, imageName can also be an image ID).
func (*Daemon) TagImageWithReference ¶ added in v1.12.0
TagImageWithReference adds the given reference to the image ID provided.
func (*Daemon) UnsubscribeFromEvents ¶ added in v1.10.0
func (daemon *Daemon) UnsubscribeFromEvents(listener chan interface{})
UnsubscribeFromEvents stops the event subscription for a client by closing the channel where the daemon sends events to.
func (*Daemon) UpdateAttachment ¶ added in v1.13.0
func (daemon *Daemon) UpdateAttachment(networkName, networkID, containerID string, config *network.NetworkingConfig) error
UpdateAttachment notifies the attacher about the attachment config.
func (*Daemon) UpdateContainerServiceConfig ¶ added in v1.12.0
func (daemon *Daemon) UpdateContainerServiceConfig(containerName string, serviceConfig *clustertypes.ServiceConfig) error
UpdateContainerServiceConfig updates a service configuration.
func (*Daemon) V4Subnets ¶ added in v1.12.0
V4Subnets returns the IPv4 subnets of networks that are managed by Docker.
func (*Daemon) V6Subnets ¶ added in v1.12.0
V6Subnets returns the IPv6 subnets of networks that are managed by Docker.
func (*Daemon) VolumeCreate ¶ added in v1.9.0
func (daemon *Daemon) VolumeCreate(name, driverName string, opts, labels map[string]string) (*types.Volume, error)
VolumeCreate creates a volume with the specified name, driver, and opts This is called directly from the Engine API
func (*Daemon) VolumeInspect ¶ added in v1.9.0
VolumeInspect looks up a volume by name. An error is returned if the volume cannot be found.
func (*Daemon) VolumeRm ¶ added in v1.9.0
VolumeRm removes the volume with the given name. If the volume is referenced by a container it is not removed This is called directly from the Engine API
func (*Daemon) Volumes ¶
Volumes lists known volumes, using the filter to restrict the range of volumes returned.
func (*Daemon) VolumesPrune ¶ added in v1.13.0
func (daemon *Daemon) VolumesPrune(config *types.VolumesPruneConfig) (*types.VolumesPruneReport, error)
VolumesPrune removes unused local volumes
type ErrImageDoesNotExist ¶ added in v1.10.0
type ErrImageDoesNotExist struct {
RefOrID string
}
ErrImageDoesNotExist is error returned when no image can be found for a reference.
func (ErrImageDoesNotExist) Error ¶ added in v1.10.0
func (e ErrImageDoesNotExist) Error() string
type LogConfig ¶ added in v1.10.0
type LogConfig struct { Type string `json:"log-driver,omitempty"` Config map[string]string `json:"log-opts,omitempty"` }
LogConfig represents the default log configuration. It includes json tags to deserialize configuration from a file using the same names that the flags in the command line use.
Source Files ¶
- apparmor_default.go
- archive.go
- archive_unix.go
- attach.go
- auth.go
- bindmount_unix.go
- cache.go
- changes.go
- checkpoint.go
- cluster.go
- commit.go
- config.go
- config_common_unix.go
- config_experimental.go
- config_unix.go
- container.go
- container_operations.go
- container_operations_unix.go
- create.go
- create_unix.go
- daemon.go
- daemon_experimental.go
- daemon_linux.go
- daemon_unix.go
- debugtrap.go
- debugtrap_unix.go
- delete.go
- discovery.go
- disk_usage.go
- errors.go
- events.go
- exec.go
- exec_linux.go
- export.go
- getsize_unix.go
- health.go
- image.go
- image_delete.go
- image_exporter.go
- image_history.go
- image_inspect.go
- image_pull.go
- image_push.go
- image_tag.go
- images.go
- import.go
- info.go
- info_unix.go
- inspect.go
- inspect_unix.go
- keys.go
- kill.go
- links.go
- list.go
- list_unix.go
- logdrivers_linux.go
- logs.go
- metrics.go
- monitor.go
- monitor_linux.go
- mounts.go
- names.go
- network.go
- oci_linux.go
- pause.go
- prune.go
- rename.go
- resize.go
- restart.go
- search.go
- seccomp_disabled.go
- secrets.go
- secrets_linux.go
- selinux_linux.go
- start.go
- start_unix.go
- stats.go
- stats_collector.go
- stats_collector_unix.go
- stats_unix.go
- stop.go
- top_unix.go
- unpause.go
- update.go
- update_linux.go
- volumes.go
- volumes_unix.go
- wait.go
Directories ¶
Path | Synopsis |
---|---|
Package logger defines interfaces that logger drivers implement to log messages.
|
Package logger defines interfaces that logger drivers implement to log messages. |
awslogs
Package awslogs provides the logdriver for forwarding container logs to Amazon CloudWatch Logs
|
Package awslogs provides the logdriver for forwarding container logs to Amazon CloudWatch Logs |
etwlogs
Package etwlogs provides a log driver for forwarding container logs as ETW events.(ETW stands for Event Tracing for Windows) A client can then create an ETW listener to listen for events that are sent by the ETW provider that we register, using the provider's GUID "a3693192-9ed6-46d2-a981-f8226c8363bd".
|
Package etwlogs provides a log driver for forwarding container logs as ETW events.(ETW stands for Event Tracing for Windows) A client can then create an ETW listener to listen for events that are sent by the ETW provider that we register, using the provider's GUID "a3693192-9ed6-46d2-a981-f8226c8363bd". |
fluentd
Package fluentd provides the log driver for forwarding server logs to fluentd endpoints.
|
Package fluentd provides the log driver for forwarding server logs to fluentd endpoints. |
gelf
Package gelf provides the log driver for forwarding server logs to endpoints that support the Graylog Extended Log Format.
|
Package gelf provides the log driver for forwarding server logs to endpoints that support the Graylog Extended Log Format. |
journald
Package journald provides the log driver for forwarding server logs to endpoints that receive the systemd format.
|
Package journald provides the log driver for forwarding server logs to endpoints that receive the systemd format. |
jsonfilelog
Package jsonfilelog provides the default Logger implementation for Docker logging.
|
Package jsonfilelog provides the default Logger implementation for Docker logging. |
logentries
Package logentries provides the log driver for forwarding server logs to logentries endpoints.
|
Package logentries provides the log driver for forwarding server logs to logentries endpoints. |
splunk
Package splunk provides the log driver for forwarding server logs to Splunk HTTP Event Collector endpoint.
|
Package splunk provides the log driver for forwarding server logs to Splunk HTTP Event Collector endpoint. |
syslog
Package syslog provides the logdriver for forwarding server logs to syslog endpoints.
|
Package syslog provides the logdriver for forwarding server logs to syslog endpoints. |