{"modulePath":"github.com/hyperhq/hypercli","version":"v1.10.16","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package daemon\n\nPackage daemon exposes the functions that occur on the host server that the Docker daemon is running.\n\nIn implementing the various functions of the daemon, there is often a method-specific struct for configuring the runtime behavior.\n\n## Constants\n\n```go\nconst (\n\t// NetworkByID represents a constant to find a network by its ID\n\tNetworkByID = iota + 1\n\t// NetworkByName represents a constant to find a network by its Name\n\tNetworkByName\n)\n```\n\n## Variables\n\n```go\nvar ErrExtractPointNotDirectory = errors.New(\"extraction point is not a directory\")\n```\nErrExtractPointNotDirectory 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.\n\n```go\nvar (\n\t// ErrRootFSReadOnly is returned when a container\n\t// rootfs is marked readonly.\n\tErrRootFSReadOnly = errors.New(\"container rootfs is marked read-only\")\n)\n```\n\n```go\nvar (\n\t// ErrVolumeReadonly is used to signal an error when trying to copy data into\n\t// a volume mount that is not writable.\n\tErrVolumeReadonly = errors.New(\"mounted volume is marked read-only\")\n)\n```\n\n## Functions\n\n```go\nfunc ReloadConfiguration(configFile string, flags *flag.FlagSet, reload func(*Config))\n```\nReloadConfiguration reads the configuration in the host and reloads the daemon and server.\n\n## Types\n\n```go\ntype CommonConfig struct {\n\tAuthorizationPlugins []string            `json:\"authorization-plugins,omitempty\"` // AuthorizationPlugins holds list of authorization plugins\n\tAutoRestart          bool                `json:\"-\"`\n\tContext              map[string][]string `json:\"-\"`\n\tDisableBridge        bool                `json:\"-\"`\n\tDNS                  []string            `json:\"dns,omitempty\"`\n\tDNSOptions           []string            `json:\"dns-opts,omitempty\"`\n\tDNSSearch            []string            `json:\"dns-search,omitempty\"`\n\tExecOptions          []string            `json:\"exec-opts,omitempty\"`\n\tExecRoot             string              `json:\"exec-root,omitempty\"`\n\tGraphDriver          string              `json:\"storage-driver,omitempty\"`\n\tGraphOptions         []string            `json:\"storage-opts,omitempty\"`\n\tLabels               []string            `json:\"labels,omitempty\"`\n\tMtu                  int                 `json:\"mtu,omitempty\"`\n\tPidfile              string              `json:\"pidfile,omitempty\"`\n\tRawLogs              bool                `json:\"raw-logs,omitempty\"`\n\tRoot                 string              `json:\"graph,omitempty\"`\n\tSocketGroup          string              `json:\"group,omitempty\"`\n\tTrustKeyPath         string              `json:\"-\"`\n\n\t// ClusterStore is the storage backend used for the cluster information. It is used by both\n\t// multihost networking (to store networks and endpoints information) and by the node discovery\n\t// mechanism.\n\tClusterStore string `json:\"cluster-store,omitempty\"`\n\n\t// ClusterOpts is used to pass options to the discovery package for tuning libkv settings, such\n\t// as TLS configuration settings.\n\tClusterOpts map[string]string `json:\"cluster-store-opts,omitempty\"`\n\n\t// ClusterAdvertise is the network endpoint that the Engine advertises for the purpose of node\n\t// discovery. This should be a 'host:port' combination on which that daemon instance is\n\t// reachable by other hosts.\n\tClusterAdvertise string `json:\"cluster-advertise,omitempty\"`\n\n\tDebug     bool     `json:\"debug,omitempty\"`\n\tHosts     []string `json:\"hosts,omitempty\"`\n\tLogLevel  string   `json:\"log-level,omitempty\"`\n\tTLS       bool     `json:\"tls,omitempty\"`\n\tTLSVerify bool     `json:\"tlsverify,omitempty\"`\n\n\t// Embedded structs that allow config\n\t// deserialization without the full struct.\n\tCommonTLSOptions\n\tLogConfig\n\t// contains filtered or unexported fields\n}\n```\nCommonConfig defines the configuration of a docker daemon which are common across platforms. It includes json tags to deserialize configuration from a file using the same names that the flags in the command line uses.\n\n```go\ntype CommonTLSOptions struct {\n\tCAFile   string `json:\"tlscacert,omitempty\"`\n\tCertFile string `json:\"tlscert,omitempty\"`\n\tKeyFile  string `json:\"tlskey,omitempty\"`\n}\n```\nCommonTLSOptions 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 uses.\n\n```go\ntype Config struct {\n\tCommonConfig\n\n\tCorsHeaders          string                   `json:\"api-cors-headers,omitempty\"`\n\tEnableCors           bool                     `json:\"api-enable-cors,omitempty\"`\n\tEnableSelinuxSupport bool                     `json:\"selinux-enabled,omitempty\"`\n\tRemappedRoot         string                   `json:\"userns-remap,omitempty\"`\n\tCgroupParent         string                   `json:\"cgroup-parent,omitempty\"`\n\tUlimits              map[string]*units.Ulimit `json:\"default-ulimits,omitempty\"`\n}\n```\nConfig 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.\n\n```go\nfunc MergeDaemonConfigurations(flagsConfig *Config, flags *flag.FlagSet, configFile string) (*Config, error)\n```\nMergeDaemonConfigurations 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.\n\n```go\nfunc (config *Config) InstallCommonFlags(cmd *flag.FlagSet, usageFn func(string) string)\n```\nInstallCommonFlags adds command-line options to the top-level flag parser for the current process. Subsequent calls to \\`flag.Parse\\` will populate config with values parsed from the command-line.\n\n```go\nfunc (config *Config) InstallFlags(cmd *flag.FlagSet, usageFn func(string) string)\n```\nInstallFlags adds command-line options to the top-level flag parser for the current process. Subsequent calls to \\`flag.Parse\\` will populate config with values parsed from the command-line.\n\n```go\nfunc (config *Config) IsValueSet(name string) bool\n```\nIsValueSet returns true if a configuration value was explicitly set in the configuration file.\n\n```go\ntype ContainerAttachWithLogsConfig struct {\n\tHijacker   http.Hijacker\n\tUpgrade    bool\n\tUseStdin   bool\n\tUseStdout  bool\n\tUseStderr  bool\n\tLogs       bool\n\tStream     bool\n\tDetachKeys []byte\n}\n```\nContainerAttachWithLogsConfig holds the streams to use when connecting to a container to view logs.\n\n```go\ntype ContainerLogsConfig struct {\n\t// if true stream log output\n\tFollow bool\n\t// if true include timestamps for each line of log output\n\tTimestamps bool\n\t// return that many lines of log output from the end\n\tTail string\n\t// filter logs by returning on those entries after this time\n\tSince time.Time\n\t// whether or not to show stdout and stderr as well as log entries.\n\tUseStdout, UseStderr bool\n\tOutStream            io.Writer\n\tStop                 \u003c-chan bool\n}\n```\nContainerLogsConfig holds configs for logging operations. Exists for users of the daemon to to pass it a logging configuration.\n\n```go\ntype ContainerStatsConfig struct {\n\tStream    bool\n\tOutStream io.Writer\n\tStop      \u003c-chan bool\n\tVersion   version.Version\n}\n```\nContainerStatsConfig holds information for configuring the runtime behavior of a daemon.ContainerStats() call.\n\n```go\ntype ContainerWsAttachWithLogsConfig struct {\n\tInStream             io.ReadCloser\n\tOutStream, ErrStream io.Writer\n\tLogs, Stream         bool\n\tDetachKeys           []byte\n}\n```\nContainerWsAttachWithLogsConfig attach with websockets, since all stream data is delegated to the websocket to handle there.\n\n```go\ntype ContainersConfig struct {\n\t// if true show all containers, otherwise only running containers.\n\tAll bool\n\t// show all containers created after this container id\n\tSince string\n\t// show all containers created before this container id\n\tBefore string\n\t// number of containers to return at most\n\tLimit int\n\t// if true include the sizes of the containers\n\tSize bool\n\t// return only containers that match filters\n\tFilters string\n}\n```\nContainersConfig is the filtering specified by the user to iterate over containers.\n\n```go\ntype Daemon struct {\n\tID string\n\n\tRegistryService *registry.Service\n\tEventsService   *events.Events\n\t// contains filtered or unexported fields\n}\n```\nDaemon holds information about the Docker daemon.\n\n```go\nfunc NewDaemon(config *Config, registryService *registry.Service) (daemon *Daemon, err error)\n```\nNewDaemon sets up everything for the daemon to be able to service requests from the webserver.\n\n```go\nfunc (daemon *Daemon) AuthenticateToRegistry(authConfig *types.AuthConfig) (string, error)\n```\nAuthenticateToRegistry checks the validity of credentials in authConfig\n\n```go\nfunc (daemon *Daemon) Cleanup(container *container.Container)\n```\nCleanup 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.\n\n```go\nfunc (daemon *Daemon) Commit(name string, c *types.ContainerCommitConfig) (string, error)\n```\nCommit creates a new filesystem image from the current state of a container. The image can optionally be tagged into a repository.\n\n```go\nfunc (daemon *Daemon) ConnectContainerToNetwork(containerName, networkName string, endpointConfig *network.EndpointSettings) error\n```\nConnectContainerToNetwork 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.\n\n```go\nfunc (daemon *Daemon) ConnectToNetwork(container *container.Container, idOrName string, endpointConfig *networktypes.EndpointSettings) error\n```\nConnectToNetwork connects a container to a network\n\n```go\nfunc (daemon *Daemon) ContainerArchivePath(name string, path string) (content io.ReadCloser, stat *types.ContainerPathStat, err error)\n```\nContainerArchivePath 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.\n\n```go\nfunc (daemon *Daemon) ContainerAttachOnBuild(cID string, stdin io.ReadCloser, stdout, stderr io.Writer, stream bool) error\n```\nContainerAttachOnBuild attaches streams to the container cID. If stream is true, it streams the output.\n\n```go\nfunc (daemon *Daemon) ContainerAttachWithLogs(prefixOrName string, c *ContainerAttachWithLogsConfig) error\n```\nContainerAttachWithLogs attaches to logs according to the config passed in. See ContainerAttachWithLogsConfig.\n\n```go\nfunc (daemon *Daemon) ContainerChanges(name string) ([]archive.Change, error)\n```\nContainerChanges returns a list of container fs changes\n\n```go\nfunc (daemon *Daemon) ContainerCopy(name string, res string) (io.ReadCloser, error)\n```\nContainerCopy performs a deprecated operation of archiving the resource at the specified path in the container identified by the given name.\n\n```go\nfunc (daemon *Daemon) ContainerCreate(params types.ContainerCreateConfig) (types.ContainerCreateResponse, error)\n```\nContainerCreate creates a container.\n\n```go\nfunc (d *Daemon) ContainerExecCreate(config *types.ExecConfig) (string, error)\n```\nContainerExecCreate sets up an exec in a running container.\n\n```go\nfunc (daemon *Daemon) ContainerExecInspect(id string) (*exec.Config, error)\n```\nContainerExecInspect returns low-level information about the exec command. An error is returned if the exec cannot be found.\n\n```go\nfunc (daemon *Daemon) ContainerExecResize(name string, height, width int) error\n```\nContainerExecResize changes the size of the TTY of the process running in the exec with the given name to the given height and width.\n\n```go\nfunc (d *Daemon) ContainerExecStart(name string, stdin io.ReadCloser, stdout io.Writer, stderr io.Writer) error\n```\nContainerExecStart starts a previously set up exec instance. The std streams are set up.\n\n```go\nfunc (daemon *Daemon) ContainerExport(name string, out io.Writer) error\n```\nContainerExport writes the contents of the container to the given writer. An error is returned if the container cannot be found.\n\n```go\nfunc (daemon *Daemon) ContainerExtractToDir(name, path string, noOverwriteDirNonDir bool, content io.Reader) error\n```\nContainerExtractToDir 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.\n\n```go\nfunc (daemon *Daemon) ContainerInspect(name string, size bool, version version.Version) (interface{}, error)\n```\nContainerInspect 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.\n\n```go\nfunc (daemon *Daemon) ContainerKill(name string, sig uint64) error\n```\nContainerKill send 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.\n\n```go\nfunc (daemon *Daemon) ContainerLogs(containerName string, config *ContainerLogsConfig) error\n```\nContainerLogs hooks up a container's stdout and stderr streams configured with the given struct.\n\n```go\nfunc (daemon *Daemon) ContainerPause(name string) error\n```\nContainerPause pauses a container\n\n```go\nfunc (daemon *Daemon) ContainerRename(oldName, newName string) error\n```\nContainerRename changes the name of a container, using the oldName to find the container. An error is returned if newName is already reserved.\n\n```go\nfunc (daemon *Daemon) ContainerResize(name string, height, width int) error\n```\nContainerResize changes the size of the TTY of the process running in the container with the given name to the given height and width.\n\n```go\nfunc (daemon *Daemon) ContainerRestart(name string, seconds int) error\n```\nContainerRestart 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.\n\n```go\nfunc (daemon *Daemon) ContainerRm(name string, config *types.ContainerRmConfig) error\n```\nContainerRm 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.\n\n```go\nfunc (daemon *Daemon) ContainerStart(name string, hostConfig *containertypes.HostConfig) error\n```\nContainerStart starts a container.\n\n```go\nfunc (daemon *Daemon) ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error)\n```\nContainerStatPath stats the filesystem resource at the specified path in the container identified by the given name.\n\n```go\nfunc (daemon *Daemon) ContainerStats(prefixOrName string, config *ContainerStatsConfig) error\n```\nContainerStats writes information about the container to the stream given in the config object.\n\n```go\nfunc (daemon *Daemon) ContainerStop(name string, seconds int) error\n```\nContainerStop 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.\n\n```go\nfunc (daemon *Daemon) ContainerTop(name string, psArgs string) (*types.ContainerProcessList, error)\n```\nContainerTop 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.\n\n```go\nfunc (daemon *Daemon) ContainerUnpause(name string) error\n```\nContainerUnpause unpauses a container\n\n```go\nfunc (daemon *Daemon) ContainerUpdate(name string, hostConfig *container.HostConfig) ([]string, error)\n```\nContainerUpdate updates resources of the container\n\n```go\nfunc (daemon *Daemon) ContainerUpdateCmdOnBuild(cID string, cmd []string) error\n```\nContainerUpdateCmdOnBuild updates Path and Args for the container with ID cID.\n\n```go\nfunc (daemon *Daemon) ContainerWait(name string, timeout time.Duration) (int, error)\n```\nContainerWait 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.\n\n```go\nfunc (daemon *Daemon) ContainerWsAttachWithLogs(prefixOrName string, c *ContainerWsAttachWithLogsConfig) error\n```\nContainerWsAttachWithLogs websocket connection\n\n```go\nfunc (daemon *Daemon) Containers(config *ContainersConfig) ([]*types.Container, error)\n```\nContainers returns the list of containers to show given the user's filtering.\n\n```go\nfunc (daemon *Daemon) CopyOnBuild(cID string, destPath string, src builder.FileInfo, decompress bool) error\n```\nCopyOnBuild 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.\n\n```go\nfunc (daemon *Daemon) CreateNetwork(name, driver string, ipam network.IPAM, options map[string]string, internal bool) (libnetwork.Network, error)\n```\nCreateNetwork creates a network with the given name, driver and other optional parameters\n\n```go\nfunc (daemon *Daemon) DeleteNetwork(networkID string) error\n```\nDeleteNetwork destroys a network unless it's one of docker's predefined networks.\n\n```go\nfunc (daemon *Daemon) DisconnectContainerFromNetwork(containerName string, network libnetwork.Network, force bool) error\n```\nDisconnectContainerFromNetwork disconnects the given container from the given network. If either cannot be found, an err is returned.\n\n```go\nfunc (daemon *Daemon) DisconnectFromNetwork(container *container.Container, n libnetwork.Network, force bool) error\n```\nDisconnectFromNetwork disconnects container from network n.\n\n```go\nfunc (d *Daemon) Exec(c *container.Container, execConfig *exec.Config, pipes *execdriver.Pipes, startCallback execdriver.DriverCallback) (int, error)\n```\nExec calls the underlying exec driver to run\n\n```go\nfunc (d *Daemon) ExecExists(name string) (bool, error)\n```\nExecExists looks up the exec instance and returns a bool if it exists or not. It will also return the error produced by \\`getConfig\\`\n\n```go\nfunc (daemon *Daemon) ExecutionDriver() execdriver.Driver\n```\nExecutionDriver returns the currently used driver for creating and starting execs in a container.\n\n```go\nfunc (daemon *Daemon) Exists(id string) bool\n```\nExists returns a true if a container of the specified ID or name exists, false otherwise.\n\n```go\nfunc (daemon *Daemon) ExportImage(names []string, outStream io.Writer) error\n```\nExportImage 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.\n\n```go\nfunc (daemon *Daemon) FindNetwork(idName string) (libnetwork.Network, error)\n```\nFindNetwork function finds a network for a given string that can represent network name or id\n\n```go\nfunc (daemon *Daemon) ForceEndpointDelete(name string, n libnetwork.Network) error\n```\nForceEndpointDelete deletes an endpoing from a network forcefully\n\n```go\nfunc (daemon *Daemon) GetAllNetworks() []libnetwork.Network\n```\nGetAllNetworks returns a list containing all networks\n\n```go\nfunc (daemon *Daemon) GetByName(name string) (*container.Container, error)\n```\nGetByName returns a container given a name.\n\n```go\nfunc (daemon *Daemon) GetCachedImage(imgID image.ID, config *containertypes.Config) (*image.Image, error)\n```\nGetCachedImage returns the most recent created image that is a child of the image with imgID, that had the same config when it was created. nil is returned if a child cannot be found. An error is returned if the parent image cannot be found.\n\n```go\nfunc (daemon *Daemon) GetCachedImageOnBuild(imgID string, cfg *containertypes.Config) (string, error)\n```\nGetCachedImageOnBuild returns a reference to a cached image whose parent equals \\`parent\\` and runconfig equals \\`cfg\\`. A cache miss is expected to return an empty ID and a nil error.\n\n```go\nfunc (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, error)\n```\nGetContainer looks for a container using the provided information, which could be one of the following inputs from the caller:\n\n  - A full container ID, which will exact match a container in daemon's list\n  - A container name, which will only exact match via the GetByName() function\n  - 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\n\n```go\nfunc (daemon *Daemon) GetContainerStats(container *container.Container) (*execdriver.ResourceStats, error)\n```\nGetContainerStats collects all the stats published by a container\n\n```go\nfunc (daemon *Daemon) GetImage(refOrID string) (*image.Image, error)\n```\nGetImage returns an image corresponding to the image referred to by refOrID.\n\n```go\nfunc (daemon *Daemon) GetImageID(refOrID string) (image.ID, error)\n```\nGetImageID returns an image ID corresponding to the image referred to by refOrID.\n\n```go\nfunc (daemon *Daemon) GetImageOnBuild(name string) (builder.Image, error)\n```\nGetImageOnBuild looks up a Docker image referenced by \\`name\\`.\n\n```go\nfunc (daemon *Daemon) GetLabels(id string) map[string]string\n```\nGetLabels for a container or image id\n\n```go\nfunc (daemon *Daemon) GetNetwork(idName string, by int) (libnetwork.Network, error)\n```\nGetNetwork function returns a network for a given string that represents the network and a hint to indicate if the string is an Id or Name of the network\n\n```go\nfunc (daemon *Daemon) GetNetworkDriverList() map[string]bool\n```\nGetNetworkDriverList returns the list of plugins drivers registered for network.\n\n```go\nfunc (daemon *Daemon) GetNetworksByID(partialID string) []libnetwork.Network\n```\nGetNetworksByID returns a list of networks whose ID partially matches zero or more networks\n\n```go\nfunc (daemon *Daemon) GetRemappedUIDGID() (int, int)\n```\nGetRemappedUIDGID 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.\n\n```go\nfunc (daemon *Daemon) GetUIDGIDMaps() ([]idtools.IDMap, []idtools.IDMap)\n```\nGetUIDGIDMaps 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.\n\n```go\nfunc (daemon *Daemon) GraphDriverName() string\n```\nGraphDriverName returns the name of the graph driver used by the layer.Store\n\n```go\nfunc (daemon *Daemon) ImageDelete(imageRef string, force, prune bool) ([]types.ImageDelete, error)\n```\nImageDelete 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.\n\nIf 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.\n\nThere may be conflicts preventing deletion of an image and these conflicts are divided into two categories grouped by their severity:\n\nHard Conflict:\n\n  - a pull or build using the image.\n  - any descendent image.\n  - any running container using the image.\n\nSoft Conflict:\n\n  - any stopped container using the image.\n  - any repository tag or digest references to the image.\n\nThe image cannot be removed if there are any hard conflicts and can be removed if there are soft conflicts only if force is true.\n\nIf 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.\n\nFIXME: 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.\n\n```go\nfunc (daemon *Daemon) ImageHistory(name string) ([]*types.ImageHistory, error)\n```\nImageHistory returns a slice of ImageHistory structures for the specified image name by walking the image lineage.\n\n```go\nfunc (daemon *Daemon) Images(filterArgs, filter string, all bool) ([]*types.Image, error)\n```\nImages 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.\n\n```go\nfunc (daemon *Daemon) ImportImage(src string, newRef reference.Named, msg string, inConfig io.ReadCloser, outStream io.Writer, config *container.Config) error\n```\nImportImage 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.\n\n```go\nfunc (daemon *Daemon) IsPaused(id string) bool\n```\nIsPaused returns a bool indicating if the specified container is paused.\n\n```go\nfunc (daemon *Daemon) IsShuttingDown() bool\n```\nIsShuttingDown tells whether the daemon is shutting down or not\n\n```go\nfunc (daemon *Daemon) Kill(container *container.Container) error\n```\nKill forcefully terminates a container.\n\n```go\nfunc (daemon *Daemon) List() []*container.Container\n```\nList returns an array of all containers registered in the daemon.\n\n```go\nfunc (daemon *Daemon) LoadImage(inTar io.ReadCloser, outStream io.Writer) error\n```\nLoadImage 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.\n\n```go\nfunc (daemon *Daemon) LogContainerEvent(container *container.Container, action string)\n```\nLogContainerEvent generates an event related to a container with only the default attributes.\n\n```go\nfunc (daemon *Daemon) LogContainerEventWithAttributes(container *container.Container, action string, attributes map[string]string)\n```\nLogContainerEventWithAttributes generates an event related to a container with specific given attributes.\n\n```go\nfunc (daemon *Daemon) LogImageEvent(imageID, refName, action string)\n```\nLogImageEvent generates an event related to a container with only the default attributes.\n\n```go\nfunc (daemon *Daemon) LogImageEventWithAttributes(imageID, refName, action string, attributes map[string]string)\n```\nLogImageEventWithAttributes generates an event related to a container with specific given attributes.\n\n```go\nfunc (daemon *Daemon) LogNetworkEvent(nw libnetwork.Network, action string)\n```\nLogNetworkEvent generates an event related to a network with only the default attributes.\n\n```go\nfunc (daemon *Daemon) LogNetworkEventWithAttributes(nw libnetwork.Network, action string, attributes map[string]string)\n```\nLogNetworkEventWithAttributes generates an event related to a network with specific given attributes.\n\n```go\nfunc (daemon *Daemon) LogVolumeEvent(volumeID, action string, attributes map[string]string)\n```\nLogVolumeEvent generates an event related to a volume.\n\n```go\nfunc (daemon *Daemon) LookupImage(name string) (*types.ImageInspect, error)\n```\nLookupImage looks up an image by name and returns it as an ImageInspect structure.\n\n```go\nfunc (daemon *Daemon) Map() map[image.ID]*image.Image\n```\nMap returns a map of all images in the ImageStore\n\n```go\nfunc (daemon *Daemon) Mount(container *container.Container) error\n```\nMount sets container.BaseFS (is it not set coming in? why is it unset?)\n\n```go\nfunc (daemon *Daemon) NetworkControllerEnabled() bool\n```\nNetworkControllerEnabled checks if the networking stack is enabled. This feature depends on OS primitives and it's disabled in systems like Windows.\n\n```go\nfunc (daemon *Daemon) PullImage(ref reference.Named, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error\n```\nPullImage initiates a pull operation. image is the repository name to pull, and tag may be either empty, or indicate a specific tag to pull.\n\n```go\nfunc (daemon *Daemon) PullOnBuild(name string, authConfigs map[string]types.AuthConfig, output io.Writer) (builder.Image, error)\n```\nPullOnBuild tells Docker to pull image referenced by \\`name\\`.\n\n```go\nfunc (daemon *Daemon) PushImage(ref reference.Named, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error\n```\nPushImage initiates a push operation on the repository named localName.\n\n```go\nfunc (daemon *Daemon) Register(container *container.Container) error\n```\nRegister makes a container object usable by the daemon as \\\u003ccontainer.ID\u003e\n\n```go\nfunc (daemon *Daemon) Reload(config *Config) error\n```\nReload reads configuration changes and modifies the daemon according to those changes. This are the settings that Reload changes: - Daemon labels.\n\n```go\nfunc (daemon *Daemon) Run(c *container.Container, pipes *execdriver.Pipes, startCallback execdriver.DriverCallback) (execdriver.ExitStatus, error)\n```\nRun uses the execution driver to run a given container\n\n```go\nfunc (daemon *Daemon) SearchRegistryForImages(term string,\n\tauthConfig *types.AuthConfig,\n\theaders map[string][]string) (*registrytypes.SearchResults, error)\n```\nSearchRegistryForImages queries the registry for images matching term. authConfig is used to login.\n\n```go\nfunc (daemon *Daemon) Shutdown() error\n```\nShutdown stops the daemon.\n\n```go\nfunc (daemon *Daemon) Start(container *container.Container) error\n```\nStart starts a container\n\n```go\nfunc (daemon *Daemon) StartLogging(container *container.Container) error\n```\nStartLogging initializes and starts the container logging stream.\n\n```go\nfunc (daemon *Daemon) SubscribeToEvents(since, sinceNano int64, filter filters.Args) ([]eventtypes.Message, chan interface{})\n```\nSubscribeToEvents returns the currently record of events, a channel to stream new events from, and a function to cancel the stream of events.\n\n```go\nfunc (daemon *Daemon) SystemInfo() (*types.Info, error)\n```\nSystemInfo returns information about the host server the daemon is running on.\n\n```go\nfunc (daemon *Daemon) SystemVersion() types.Version\n```\nSystemVersion returns version information about the daemon.\n\n```go\nfunc (daemon *Daemon) TagImage(newTag reference.Named, imageName string) error\n```\nTagImage creates the tag specified by newTag, pointing to the image named imageName (alternatively, imageName can also be an image ID).\n\n```go\nfunc (daemon *Daemon) Unmount(container *container.Container)\n```\nUnmount unsets the container base filesystem\n\n```go\nfunc (daemon *Daemon) UnsubscribeFromEvents(listener chan interface{})\n```\nUnsubscribeFromEvents stops the event subscription for a client by closing the channel where the daemon sends events to.\n\n```go\nfunc (daemon *Daemon) VolumeCreate(name, driverName string, opts map[string]string) (*types.Volume, error)\n```\nVolumeCreate creates a volume with the specified name, driver, and opts This is called directly from the remote API\n\n```go\nfunc (daemon *Daemon) VolumeInspect(name string) (*types.Volume, error)\n```\nVolumeInspect looks up a volume by name. An error is returned if the volume cannot be found.\n\n```go\nfunc (daemon *Daemon) VolumeRm(name string) error\n```\nVolumeRm 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 remote API\n\n```go\nfunc (daemon *Daemon) Volumes(filter string) ([]*types.Volume, []string, error)\n```\nVolumes lists known volumes, using the filter to restrict the range of volumes returned.\n\n```go\ntype ErrImageDoesNotExist struct {\n\tRefOrID string\n}\n```\nErrImageDoesNotExist is error returned when no image can be found for a reference.\n\n```go\nfunc (e ErrImageDoesNotExist) Error() string\n```\n\n```go\ntype LogConfig struct {\n\tType   string            `json:\"log-driver,omitempty\"`\n\tConfig map[string]string `json:\"log-opts,omitempty\"`\n}\n```\nLogConfig 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 uses.\n\n","path":"github.com/hyperhq/hypercli/daemon","name":"daemon","synopsis":"Package daemon exposes the functions that occur on the host server that the Docker daemon is running.","isRedistributable":true}
