Create a config
Optionalbody: ConfigCreateRequestOptionaloptions: RawAxiosRequestConfigOverride http request option.
Possible response codes:
Delete a config
ID of the config
Optionaloptions: RawAxiosRequestConfigOverride http request option.
Possible response codes:
Retrieve detailed information about a specific config.
The ID of the config to inspect.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Possible response codes:
List all configs.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the configs list. Available filters:
id=<config id>label=<key> or label=<key>=<value>name=<config name>names=<config name>Optionaloptions: RawAxiosRequestConfigOverride HTTP request option.
Possible response codes:
Update a Config
The ID or name of the config.
The version number of the config object being updated. This is required to avoid conflicting writes.
Optional parameters
Optionalbody?: ConfigSpecThe spec of the config to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the ConfigInspect endpoint response values.
Optionaloptions?: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Possible response codes:
Get a tar archive of a resource in the filesystem of a container.
ID or name of the container
Resource in the container’s filesystem to archive.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Retrieves information about files in a container. A response header X-Docker-Container-Path-Stat is returned, containing a base64-encoded JSON object with some filesystem header information about the path.
ID or name of the container
Resource in the container’s filesystem to archive.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached. Either the stream or logs parameter must be true for this endpoint to do anything.
See the documentation for the docker attach command for more details.
This endpoint hijacks the HTTP connection to transport stdin, stdout, and stderr on the same socket.
This is the response from the daemon for an attach request:
HTTP/1.1 200 OK
Content-Type: application/vnd.docker.raw-stream
[STREAM]
After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers. For example, the client sends this request to upgrade the connection:
POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
Upgrade: tcp
Connection: Upgrade
The Docker daemon will respond with a 101 UPGRADED response, and will similarly follow with the raw stream:
HTTP/1.1 101 UPGRADED
Content-Type: application/vnd.docker.raw-stream
Connection: Upgrade
Upgrade: tcp
[STREAM]
When the TTY setting is disabled in POST /containers/create, the stream over the hijacked connection is multiplexed to separate out stdout and stderr. The stream consists of a series of frames, each containing a header and a payload.
The header contains the information which the stream writes (stdout or stderr). It also contains the size of the associated frame encoded in the last four bytes (uint32).
It is encoded on the first eight bytes like this:
header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
STREAM_TYPE can be:
stdin (is written on stdout)stdoutstderr
SIZE1, SIZE2, SIZE3, SIZE4 are the four bytes of the uint32 size encoded as big endian.
Following the header is the payload, which is the specified number of bytes of STREAM_TYPE.
The simplest way to implement this protocol is the following:stdout or stderr depending on the first byte.When the TTY setting is enabled in POST /containers/create, the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's stdin.
ID or name of the container
Optionalparams: { Optional parameters
OptionaldetachOverride the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, ,, or _.
Optionallogs?: booleanReplay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If stream is also enabled, once all the previous output has been returned, it will seamlessly transition into streaming current output.
Optionaloptions?: RawAxiosRequestConfigOverride HTTP request options.
Optionalstderr?: booleanAttach to stderr
Optionalstdin?: booleanAttach to stdin
Optionalstdout?: booleanAttach to stdout
Optionalstream?: booleanStream attached streams from the time the request was made onwards.
Possible response codes:
Attach to a container via a websocket.
ID or name of the container
Optionalparams: { Optional parameters
OptionaldetachOverride the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, ,, or _.
Optionallogs?: booleanReturn logs
Optionaloptions?: RawAxiosRequestConfigOverride HTTP request options.
Optionalstream?: booleanReturn stream
Possible response codes:
Returns which files in a container's filesystem have been added, deleted, or modified. The Kind of modification can be one of:
0: Modified1: Added2: DeletedID or name of the container
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Create a container.
The container configuration
Optionalparams: { Optional parameters
Optionalname?: stringAssign the specified name to the container. Must match the regex /?[a-zA-Z0-9][a-zA-Z0-9_.-]+.
Optionaloptions?: RawAxiosRequestConfigOverride HTTP request options.
Optionalplatform?: stringPlatform in the format os[/arch[/variant]] used for image lookup. When specified, the daemon checks if the requested image is present in the local image cache with the given OS and Architecture, and otherwise returns a 404 status. If the option is not set, the host's native OS and Architecture are used to look up the image in the image cache. However, if no platform is passed and the given image does exist in the local image cache, but its OS or architecture does not match, the container is created with the available image, and a warning is added to the Warnings field in the response, for example; WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested.
Possible response codes:
Remove a container.
ID or name of the container
Optional parameters
Optionalforce?: booleanIf the container is running, kill it before removing it.
Optionallink?: booleanRemove the specified link associated with the container.
Optionaloptions?: RawAxiosRequestConfigOverride HTTP request option.
Optionalv?: booleanRemove anonymous volumes associated with the container.
Possible response codes:
Export the contents of a container as a tarball.
The ID or name of the container
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Retrieve detailed information about a container.
The ID or name of the container
Optionalsize: booleanIf true, includes the size of the container as fields SizeRw and SizeRootFs
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Possible response codes:
Sends a POSIX signal to a container, defaulting to killing the container.
The ID or name of the container
Optionalsignal: stringThe signal to send to the container as an integer or string (e.g. SIGINT).
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Returns a list of containers. For details on the format, see the inspect endpoint. Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated.
Optionalall: booleanReturn all containers. By default, only running containers are shown.
Optionallimit: numberReturn this number of most recently created containers, including non-running ones.
Optionalsize: booleanReturn the size of container as fields SizeRw and SizeRootFs.
Optionalfilters: stringFilters to process on the container list, encoded as JSON (a map[string][]string). For example, {"status": ["paused"]} will only return paused containers. Available filters:
ancestor=(<image-name>[:<tag>], <image id>, or <image@digest>)before=(<container id> or <container name>)expose=(<port>[/<proto>]|<startport-endport>/[<proto>])exited=<int> containers with exit code of <int>health=(starting|healthy|unhealthy|none)id=<ID> a container's IDisolation=(default|process|hyperv) (Windows daemon only)is-task=(true|false)label=key or label="key=value" of a container labelname=<name> a container's namenetwork=(<network id> or <network name>)publish=(<port>[/<proto>]|<startport-endport>/[<proto>])since=(<container id> or <container name>)status=(created|restarting|running|removing|paused|exited|dead)volume=(<volume name> or <mount point destination>)Optionaloptions: RawAxiosRequestConfigOverride HTTP request option.
The request arguments to be sent to the API.
Retrieve stdout and stderr logs from a container. Note: This endpoint works only for containers with the json-file or journald logging driver.
The ID or name of the container
Optionalparams: { Optional parameters
Optionalfollow?: booleanKeep the connection open after returning logs.
Optionaloptions?: RawAxiosRequestConfigOverride HTTP request options.
Optionalsince?: numberOnly return logs since this time, as a UNIX timestamp.
Optionalstderr?: booleanReturn logs from stderr. Must choose this or stdout.
Optionalstdout?: booleanReturn logs from stdout. Must choose this or stderr.
Optionaltail?: stringOnly return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines.
Optionaltimestamps?: booleanAdd timestamps to every log line.
Optionaluntil?: numberOnly return logs before this time, as a UNIX timestamp.
Possible response codes:
Use the freezer cgroup to suspend all processes in a container. Traditionally, when suspending a process the SIGSTOP signal is used, which is observable by the process being suspended. With the freezer cgroup, the process is unaware and unable to capture that it is being suspended and subsequently resumed.
The ID or name of the container
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Possible response codes:
Delete stopped containers based on the provided filters.
Optionalfilters: stringFilters to process on the prune list, encoded as JSON (a map[string][]string). Available filters:
until=<timestamp>: Prune containers created before this timestamp. The <timestamp> can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the daemon machine’s time.label (label=<key>, label=<key>=<value>, label!=<key>, or label!=<key>=<value>): Prune containers with (or without, in case label!=... is used) the specified labels.Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Possible response codes:
Rename an existing container.
The ID or name of the container to rename
The new name for the container
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Possible response codes:
Resize the TTY (teletypewriter) for a container.
The ID or name of the container
Optionalh: numberThe height of the TTY session in characters
Optionalw: numberThe width of the TTY session in characters
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Possible response codes:
Restart a container.
The ID or name of the container
Optionalt: numberNumber of seconds to wait before killing the container
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Possible response codes:
Start a container.
The ID or name of the container
OptionaldetachKeys: stringOverride the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Possible response codes:
This endpoint returns a live stream of a container’s resource usage statistics.
The precpu_stats field contains the CPU statistics from the previous read, which is used to calculate the CPU usage percentage. It is not an exact copy of the cpu_stats field.
If either precpu_stats.online_cpus or cpu_stats.online_cpus is nil, then for compatibility with older daemons, the length of the corresponding cpu_usage.percpu_usage array should be used.
On a cgroup v2 host, the following fields are not set:
blkio_stats: all fields other than io_service_bytes_recursivecpu_stats: cpu_usage.percpu_usagememory_stats: max_usage and failcnt
Also, memory_stats.stats fields are incompatible with cgroup v1.To calculate the values shown by the stats command of the Docker CLI tool, the following formulas can be used:
memory_stats.usage - memory_stats.stats.cachememory_stats.limit(used_memory / available_memory) * 100.0cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usagecpu_stats.system_cpu_usage - precpu_stats.system_cpu_usagelength(cpu_stats.cpu_usage.percpu_usage) or cpu_stats.online_cpus(cpu_delta / system_cpu_delta) * number_cpus * 100.0ID or name of the container
Optionalstream: booleanStream the output. If false, the stats will be output once and then it will disconnect.
OptionaloneShot: booleanOnly get a single stat instead of waiting for 2 cycles. Must be used with stream=false.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Stops a running container. The container will be stopped gracefully, waiting for the specified number of seconds before forcefully killing it.
ID or name of the container
Optionalt: numberNumber of seconds to wait before killing the container
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
This method lists the processes running inside a container. On Unix systems, this is done by running the ps command.
Note: This endpoint is not supported on Windows.
ID or name of the container
OptionalpsArgs: stringThe arguments to pass to the ps command. For example, aux
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Resume a container that has been paused.
ID or name of the container
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Possible response codes:
Modify the configuration settings of an existing container without needing to recreate it.
The ID or name of the container
The update request object containing the new configuration settings
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options
Possible response codes:
Wait until a container stops and then return the exit code.
The ID or name of the container
Optionalcondition: ContainerWaitConditionEnumThe condition to wait for before returning. Defaults to not-running if omitted or empty.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Upload a tar archive to be extracted to a specified path in the filesystem of a container. The path parameter must be a directory. If it exists as a file, a 400 error will be returned with the message "not a directory".
The ID or name of the container
The path to a directory in the container where the archive’s contents will be extracted
The input stream must be a tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, or xz
OptionalnoOverwriteDirNonDir: stringIf 1, true, or True, 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
OptionalcopyUIDGID: stringIf 1, true, it will copy UID/GID maps to the destination file or directory
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options
Possible response codes:
Retrieves the image digest and platform information by contacting the registry.
The name or ID of the image.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Run a command inside a running container.
The ID or name of the container.
The configuration for the exec instance.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Returns detailed information about an exec instance.
The ID of the exec instance.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Resize the TTY session used by an exec instance. This endpoint only works if tty was specified as part of creating and starting the exec instance.
The ID of the exec instance.
Optionalh: numberThe height of the TTY session in characters.
Optionalw: numberThe width of the TTY session in characters.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.
The ID of the exec instance.
OptionalexecStartConfig: ExecStartConfigConfiguration for starting the exec instance.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Deletes the builder cache.
OptionalkeepStorage: numberAmount of disk space in bytes to keep for cache.
Optionalall: booleanRemove all types of build cache.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the list of build cache objects. Available filters:
until=<duration>: duration relative to daemon's time, during which build cache was not used, in Go's duration format (e.g., '24h')id=<id>parent=<id>type=<string>description=<string>inusesharedprivateOptionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Possible response codes:
Builds a Docker image from a tar archive containing a Dockerfile. The Dockerfile specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the dockerfile parameter. See the Dockerfile reference for more information. The Docker daemon performs a preliminary validation of the Dockerfile before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output. The build is canceled if the client drops the connection by quitting or being killed.
The parameters for building the image.
Optionalbuildargs?: stringJSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the Dockerfile RUN instruction, or for variable expansion in other Dockerfile instructions. This is not meant for passing secret values. For example, the build arg FOO=bar would become {"FOO":"bar"} in JSON. This would result in the query parameter buildargs={"FOO":"bar"}. Note that {"FOO":"bar"} should be URI component encoded. Read more about the buildargs instruction.
Optionalcachefrom?: stringJSON array of images used for build cache resolution.
OptionalcontentThe content type of the build.
Optionalcpuperiod?: numberThe length of a CPU period in microseconds.
Optionalcpuquota?: numberMicroseconds of CPU time that the container can get in a CPU period.
Optionalcpusetcpus?: stringCPUs in which to allow execution (e.g., 0-3, 0,1).
Optionalcpushares?: numberCPU shares (relative weight).
Optionaldockerfile?: stringPath within the build context to the Dockerfile. This is ignored if remote is specified and points to an external Dockerfile.
Optionalextrahosts?: stringExtra hosts to add to /etc/hosts.
Optionalforcerm?: booleanAlways remove intermediate containers, even upon failure.
OptionalinputA tar archive compressed with one of the following algorithms: identity (no compression), gzip, bzip2, xz.
Optionallabels?: stringArbitrary key/value labels to set on the image, as a JSON map of string pairs.
Optionalmemory?: numberSet memory limit for build.
Optionalmemswap?: numberTotal memory (memory + swap). Set as -1 to disable swap.
Optionalnetworkmode?: stringSets the networking mode for the run commands during build. Supported standard values are: bridge, host, none, and container:<name|id>. Any other value is taken as a custom network's name or ID to which this container should connect.
Optionalnocache?: booleanDo not use the cache when building the image.
Optionaloptions?: RawAxiosRequestConfigOverride HTTP request option.
Optionaloutputs?: stringBuildKit output configuration.
Optionalplatform?: stringPlatform in the format os[/arch[/variant]].
Optionalpull?: stringAttempt to pull the image even if an older image exists locally.
Optionalq?: booleanSuppress verbose build output.
Optionalremote?: stringA Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called Dockerfile and the image is built from that file. If the URI points to a tarball, the file is downloaded by the daemon and the contents therein used as the context for the build. If the URI points to a tarball and the dockerfile parameter is also specified, there must be a file with the corresponding path inside the tarball.
Optionalrm?: booleanRemove intermediate containers after a successful build.
Optionalshmsize?: numberSize of /dev/shm in bytes. The size must be greater than 0. If omitted, the system uses 64MB.
Optionalsquash?: booleanSquash the resulting image's layers into a single layer. (Experimental release only.)
Optionalt?: stringA name and optional tag to apply to the image in the name:tag format. If you omit the tag, the default latest value is assumed. You can provide several t parameters.
Optionaltarget?: stringTarget build stage.
Optionalversion?: ImageBuildVersionEnumVersion of the builder backend to use. - 1 is the first generation classic (deprecated) builder in the Docker daemon (default) - 2 is BuildKit
OptionalxThis is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. The key is a registry URL, and the value is an auth configuration object, as described in the authentication section. For example: { "docker.example.com": { "username": "janedoe", "password": "hunter2" }, "https://index.docker.io/v1/": { "username": "mobydock", "password": "conta1n3rize14" } } Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a https:// prefix and a /v1/ suffix even though Docker will prefer to use the v2 registry API.
Possible response codes:
Create a new image from a container.
Optionalcontainer: stringThe ID or name of the container to commit
Optionalrepo: stringRepository name for the created image
Optionaltag: stringTag name for the created image
Optionalcomment: stringCommit message
Optionalauthor: stringAuthor of the image (e.g., John Hannibal Smith <hannibal@a-team.com>)
Optionalpause: booleanWhether to pause the container before committing
Optionalchanges: stringDockerfile instructions to apply while committing
OptionalcontainerConfig: ContainerConfigThe container configuration
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
A promise that resolves to the response of the image commit operation.
Response codes:
Create an image by either pulling it from a registry or importing it.
Parameters for creating an image
Optionalchanges?: string[]Apply Dockerfile instructions to the image that is created, for example: changes=ENV DEBUG=true. Note that ENV DEBUG=true should be URI component encoded. Supported Dockerfile instructions: CMD|ENTRYPOINT|ENV|EXPOSE|ONBUILD|USER|VOLUME|WORKDIR
OptionalfromName of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed.
OptionalfromSource to import. The value may be a URL from which the image can be retrieved or - to read the image from the request body. This parameter may only be used when importing an image.
OptionalinputImage content if the value - has been specified in fromSrc query parameter
Optionalmessage?: stringSet commit message for imported image.
Optionalplatform?: stringPlatform in the format os[/arch[/variant]]
Optionalrepo?: stringRepository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image.
Optionaltag?: stringTag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled.
OptionalxA base64url-encoded auth configuration. Refer to the authentication section for details.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
A promise that resolves to the response of the image creation operation.
Response codes:
Remove an image, along with any untagged parent images that were referenced by that image. Images cannot be removed if they have descendant images, are being used by a running container, or are being used by a build.
The name or ID of the image to remove
Optionalforce: booleanIf true, force the removal of the image even if it is being used by stopped containers or has other tags
Optionalnoprune: booleanIf true, do not delete untagged parent images
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options
A promise that resolves to the response of the image removal operation.
Response codes:
Get a tarball containing all images and metadata for a repository.
If name is a specific name and tag (e.g. ubuntu:latest), then only that image (and its parents) are returned.
If name is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the repositories file in the tarball, as there were no image names referenced.
An image tarball contains one directory per image layer (named using its long ID), each containing these files:
VERSION: currently 1.0 - the file format versionjson: detailed layer information, similar to docker inspect layer_idlayer.tar: A tarfile containing the filesystem changes in this layerThe layer.tar file contains aufs style .wh..wh.aufs files and directories for storing attribute changes and deletions.
If the tarball defines a repository, the tarball should also include a repositories file at the root that contains a list of repository and tag names mapped to layer IDs.
{
"hello-world": {
"latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
}
}
Image name or ID
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
A promise that resolves to the response of the image export operation.
Response codes:
Retrieve a tarball containing all images and metadata for multiple image repositories.
For each value in the names parameter:
ubuntu:latest), only that image (and its parents) are returned.Optionalnames: string[]Image names to filter by
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
A promise that resolves to the response of the image export operation.
Response codes:
Retrieve the parent layers of a specified image.
The name or ID of the image
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the image history operation.
Response codes:
Retrieve detailed information about a specific image.
The name or ID of the image.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the image inspection operation.
Response codes:
Retrieves a list of images on the server. This method uses a different, smaller representation of an image compared to inspecting a single image.
Optionalall: booleanShow all images. By default, only images from a final layer (no children) are shown.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
before=(<image-name>[:<tag>], <image id> or <image@digest>)dangling=truelabel=key or label="key=value" of an image labelreference=(<image-name>[:<tag>])since=(<image-name>[:<tag>], <image id> or <image@digest>)Optionaldigests: booleanShow digest information as a RepoDigests field on each image.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
A promise that resolves to the response of the image list operation.
Response codes:
Load a set of images and tags into a repository. For details on the format, see the export image endpoint.
Optionalquiet: booleanSuppress progress details during load.
OptionalimagesTarball: FileTar archive containing images.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the image load operation.
Response codes:
Deletes unused images from the server.
Optionalfilters: stringFilters to process on the prune list, encoded as JSON (a map[string][]string). Available filters:
dangling=<boolean> When set to true (or 1), prune only unused and untagged images. When set to false (or 0), all unused images are pruned.until=<string> Prune images created before this timestamp. The <timestamp> can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the daemon machine’s time.label (label=<key>, label=<key>=<value>, label!=<key>, or label!=<key>=<value>) Prune images with (or without, in case label!=... is used) the specified labels.Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
A promise that resolves to the response of the image prune operation.
Response codes:
Push an image to a registry. If you want to push an image to a private registry, the image must already have a tag that references the registry. For example, registry.example.com/myimage:latest. The push is cancelled if the HTTP connection is closed.
The name or ID of the image.
A base64url-encoded authentication configuration. Refer to the authentication section for details.
Optionaltag: stringThe tag to associate with the image on the registry.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the image push operation.
Response codes:
Search for an image on Docker Hub.
The term to search for.
Optionallimit: numberThe maximum number of results to return.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
is-automated=(true|false)is-official=(true|false)stars=<number> Matches images that have at least 'number' stars.Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the image search operation.
Response codes:
Tag an image so that it becomes part of a repository.
The name or ID of the image to tag.
Optionalrepo: stringThe repository to tag in. For example, someuser/someimage.
Optionaltag: stringThe name of the new tag.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the image tag operation.
Response codes:
Connect a container to a network.
Network ID or name
The container to connect to the network
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the network connect operation.
Response codes:
Create a new network with the specified configuration.
The configuration for the new network
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options
A promise that resolves to the response of the network creation operation.
Response codes:
Remove a network by its ID or name.
The ID or name of the network to be removed
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options
A promise that resolves to the response of the network removal operation.
Response codes:
Disconnect a container from a network.
The ID or name of the network
The container to disconnect from the network
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options
A promise that resolves to the response of the network disconnection operation.
Response codes:
Inspect a network by its ID or name.
The ID or name of the network to inspect
Optionalverbose: booleanIf true, provides detailed inspect output for troubleshooting
Optionalscope: stringFilter the network by scope (swarm, global, or local)
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options
A promise that resolves to the response of the network inspection operation.
Response codes:
Returns a list of networks. For details on the format, see the network inspect endpoint. Note that it uses a different, smaller representation of a network than inspecting a single network. For example, the list of containers attached to the network is not propagated in API versions 1.28 and up.
Optionalfilters: stringJSON encoded value of the filters (a map[string][]string) to process on the networks list. Available filters:
dangling=<boolean> When set to true (or 1), returns all networks that are not in use by a container. When set to false (or 0), only networks that are in use by one or more containers are returned.driver=<driver-name> Matches a network's driver.id=<network-id> Matches all or part of a network ID.label=<key> or label=<key>=<value> Matches a network label.name=<network-name> Matches all or part of a network name.scope=["swarm"|"global"|"local"] Filters networks by scope (swarm, global, or local).type=["custom"|"builtin"] Filters networks by type. The custom keyword returns all user-defined networks.Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the network listing operation.
Response codes:
Delete unused networks.
Optionalfilters: stringFilters to process on the prune list, encoded as JSON (a map[string][]string). Available filters:
until=<timestamp> Prune networks created before this timestamp. The <timestamp> can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the daemon machine’s time.label (label=<key>, label=<key>=<value>, label!=<key>, or label!=<key>=<value>) Prune networks with (or without, in case label!=... is used) the specified labels.Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the network prune operation.
Response codes:
Deletes a node from the swarm.
The ID or name of the node
Optionalforce: booleanForce remove a node from the swarm
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the node deletion operation.
Response codes:
Inspect a node to retrieve detailed information.
The ID or name of the node
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the node inspection operation.
Response codes:
Lists all nodes in the swarm.
Optionalfilters: stringFilters to process on the nodes list, encoded as JSON (a map[string][]string). Available filters:
id=<node id>label=<engine label>membership=(accepted|pending)name=<node name>node.label=<node label>role=(manager|worker)Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the node listing operation.
Response codes:
Update a node with the specified ID and version.
The ID of the node
The version number of the node object being updated. This is required to avoid conflicting writes.
Optionalbody: NodeSpecThe new specification for the node
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the node update operation.
Response codes:
Retrieves the privileges required by a plugin.
The name of the plugin. The :latest tag is optional, and is the default if omitted.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin privileges operation.
Response codes:
Create a new plugin with the specified name and context.
The name of the plugin. The :latest tag is optional, and is the default if omitted.
OptionaltarContext: FilePath to tar containing plugin rootfs and manifest.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin creation operation.
Response codes:
Removes a plugin.
The name of the plugin. The :latest tag is optional, and is the default if omitted.
Optionalforce: booleanDisable the plugin before removing. This may result in issues if the plugin is in use by a container.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin removal operation.
Response codes:
Disable a plugin.
The name of the plugin. The :latest tag is optional, and is the default if omitted.
Optionalforce: booleanForce disable a plugin even if still in use.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin disable operation.
Response codes:
Enable a plugin.
The name of the plugin. The :latest tag is optional, and is the default if omitted.
Optionaltimeout: numberSet the HTTP client timeout (in seconds).
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin enable operation.
Response codes:
Inspect a plugin to retrieve detailed information about it.
The name of the plugin. The :latest tag is optional, and is the default if omitted.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin inspect operation.
Response codes:
Returns information about installed plugins.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the plugin list. Available filters:
capability=<capability name>enable=<true>|<false>Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin list operation.
Response codes:
Pulls and installs a plugin. After the plugin is installed, it can be enabled using the POST /plugins/{name}/enable endpoint.
The remote reference for the plugin to install. The :latest tag is optional and is used as the default if omitted.
Optionalname: stringThe local name for the pulled plugin. The :latest tag is optional and is used as the default if omitted.
OptionalxRegistryAuth: stringA base64url-encoded authentication configuration to use when pulling a plugin from a registry. Refer to the authentication section for details.
Optionalbody: PluginPrivilege[]The privileges to grant the plugin.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin pull operation.
Response codes:
Push a plugin to the registry.
The name of the plugin. The :latest tag is optional and is the default if omitted.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin push operation.
Response codes:
Configures a plugin with the specified settings.
The name of the plugin. The :latest tag is optional and is the default if omitted.
Optionalbody: string[]The configuration settings for the plugin.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin configuration operation.
Response codes:
Upgrade a plugin to a newer version.
The name of the plugin. The :latest tag is optional and is the default if omitted.
Remote reference to upgrade to. The :latest tag is optional and is used as the default if omitted.
OptionalxRegistryAuth: stringA base64url-encoded authentication configuration to use when pulling a plugin from a registry. Refer to the authentication section for details.
Optionalbody: PluginPrivilege[]The privileges required by the plugin.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the plugin upgrade operation.
Response codes:
Creates a new secret.
Optionalbody: SecretCreateRequestThe request body containing the secret details.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the secret creation operation.
Response codes:
Deletes a secret by its ID.
The ID of the secret to delete.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the secret deletion operation.
Response codes:
Retrieve detailed information about a specific secret.
The ID of the secret to inspect.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the secret inspection operation.
Response codes:
Lists all secrets.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the secrets list. Available filters:
id=<secret id>label=<key> or label=<key>=valuename=<secret name>names=<secret name>Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the secrets list operation.
Response codes:
Update a Secret
The ID or name of the secret.
The version number of the secret object being updated. This is required to avoid conflicting writes.
Optionalbody: SecretSpecThe spec of the secret to update. Currently, only the Labels field can be updated. All other fields must remain unchanged from the SecretInspect endpoint response values.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the secret update operation.
Response codes:
Create a new service.
The service creation request body.
OptionalxRegistryAuth: stringA base64url-encoded authentication configuration for pulling from private registries. Refer to the authentication section for details.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the service creation operation.
Possible response codes:
Deletes a service by its ID or name.
The ID or name of the service to delete.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the service delete operation.
Possible response codes:
Inspect a service by its ID or name.
The ID or name of the service to inspect.
OptionalinsertDefaults: booleanFill empty fields with default values.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the service inspection operation.
Possible response codes:
List services with optional filters and status.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the services list. Available filters:
id=<service id>label=<service label>mode=["replicated"|"global"]name=<service name>Optionalstatus: booleanInclude service status, with count of running and desired tasks.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
A promise that resolves to the response of the service list operation.
Possible response codes:
Retrieve stdout and stderr logs from a service. See also /containers/{id}/logs.
Note: This endpoint works only for services with the local, json-file or journald logging drivers.
The ID or name of the service
Optionaldetails: booleanShow service context and extra details provided to logs.
Optionalfollow: booleanKeep the connection open after returning logs.
Optionalstdout: booleanReturn logs from stdout
Optionalstderr: booleanReturn logs from stderr
Optionalsince: numberOnly return logs since this time, as a UNIX timestamp
Optionaltimestamps: booleanAdd timestamps to every log line
Optionaltail: stringOnly return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request options.
Update a service with the specified parameters.
The ID or name of the service.
The version number of the service object being updated. This is required to avoid conflicting writes. This version number should be the value as currently set on the service before the update. You can find the current version by calling GET /services/{id}.
The service update request body.
OptionalregistryAuthFrom: ServiceUpdateRegistryAuthFromEnumIf the X-Registry-Auth header is not specified, this parameter indicates where to find registry authorization credentials.
Optionalrollback: stringSet this parameter to previous to cause a server-side rollback to the previous service spec. The supplied spec will be ignored in this case.
OptionalxRegistryAuth: stringA base64url-encoded auth configuration for pulling from private registries. Refer to the authentication section for details.
Optionaloptions: RawAxiosRequestConfigOptional parameter to override HTTP request options.
Start a new interactive session with a server. This session allows the server to call back to the client for advanced capabilities.
This endpoint hijacks the HTTP connection to HTTP2 transport, allowing the client to expose gRPC services on that connection.
For example, the client sends this request to upgrade the connection:
POST /session HTTP/1.1
Upgrade: h2c
Connection: Upgrade
The Docker daemon responds with a 101 UPGRADED response followed by the raw stream:
HTTP/1.1 101 UPGRADED
Connection: Upgrade
Upgrade: h2c
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request
Unlock a locked manager node in the swarm.
The request body containing the unlock key.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Joins an existing swarm.
The request body containing the swarm join parameters.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Leave a swarm.
Optionalforce: booleanForce leave swarm, even if this is the last manager or that it will break the cluster.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Initializes a new swarm.
The request body containing the swarm initialization parameters.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Update a swarm with the specified parameters.
The version number of the swarm object being updated. This is required to avoid conflicting writes.
The swarm specification to update.
OptionalrotateWorkerToken: booleanRotate the worker join token.
OptionalrotateManagerToken: booleanRotate the manager join token.
OptionalrotateManagerUnlockKey: booleanRotate the manager unlock key.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Retrieve the unlock key for the swarm.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Validate credentials for a registry and, if available, get an identity token for accessing the registry without a password.
OptionalauthConfig: AuthConfigAuthentication configuration to check.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Retrieve data usage information from the system.
Optionaloptions: RawAxiosRequestConfigOptional parameters to override the HTTP request.
Stream real-time events from the server. Various objects within Docker report events when something happens to them.
Containers report these events: attach, commit, copy, create, destroy, detach, die, exec_create, exec_detach, exec_start, exec_die, export, health_status, kill, oom, pause, rename, resize, restart, start, stop, top, unpause, update, and prune.
Images report these events: delete, import, load, pull, push, save, tag, untag, and prune.
Volumes report these events: create, mount, unmount, destroy, and prune.
Networks report these events: create, connect, disconnect, destroy, update, remove, and prune.
The Docker daemon reports these events: reload.
Services report these events: create, update, and remove.
Nodes report these events: create, update, and remove.
Secrets report these events: create, update, and remove.
Configs report these events: create, update, and remove.
The Builder reports prune events.
Optionalparams: { Parameters for monitoring events
Optionalfilters?: stringA JSON encoded value of filters (a map[string][]string) to process on the event list. Available filters:
config=<string> config name or IDcontainer=<string> container name or IDdaemon=<string> daemon name or IDevent=<string> event typeimage=<string> image name or IDlabel=<string> image or container labelnetwork=<string> network name or IDnode=<string> node IDplugin=<string> plugin name or IDscope=<string> local or swarmsecret=<string> secret name or IDservice=<string> service name or IDtype=<string> object to filter by, one of container, image, volume, network, daemon, plugin, node, service, secret or configvolume=<string> volume nameOptionaloptions?: RawAxiosRequestConfigOverride HTTP request option.
Optionalsince?: stringShow events created since this timestamp (unix) then stream new events.
Optionaluntil?: stringShow events created until this timestamp (unix) then stop streaming.
This endpoint returns the version of Docker that is running and various information about the system that Docker is running on.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request option.
Retrieves system information from the Docker daemon.
Optionaloptions: RawAxiosRequestConfigOverride HTTP request option.
This endpoint allows you to list tasks with optional filters.
Optionalfilters: stringA JSON encoded value of the filters (a map[string][]string) to process on the tasks list. Available filters:
desired-state=(running | shutdown | accepted)id=<task id>label=key or label="key=value"name=<task name>node=<node id or name>service=<service name>Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
This endpoint allows you to get stdout and stderr logs from a task.
See also /containers/{id}/logs.
Note: This endpoint works only for services with the local, json-file or journald logging drivers.
The ID of the task to get logs from.
Optionaldetails: booleanShow task context and extra details provided to logs.
Optionalfollow: booleanKeep connection after returning logs.
Optionalstdout: booleanReturn logs from stdout.
Optionalstderr: booleanReturn logs from stderr.
Optionalsince: numberOnly return logs since this time, as a UNIX timestamp.
Optionaltimestamps: booleanAdd timestamps to every log line.
Optionaltail: stringOnly return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines.
Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
This endpoint allows you to inspect a specific task by its ID.
The ID of the task to inspect.
Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
Inspects the specified volume and returns detailed information about it.
The name or ID of the volume to inspect.
Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
Lists all volumes.
Optionalfilters: stringJSON encoded value of the filters (a map[string][]string) to process on the volumes list. Available filters:
dangling=<boolean>: When set to true (or 1), returns all volumes that are not in use by a container. When set to false (or 0), only volumes that are in use by one or more containers are returned.driver=<volume-driver-name>: Matches volumes based on their driver.label=<key> or label=<key>:<value>: Matches volumes based on the presence of a label alone or a label and a value.name=<volume-name>: Matches all or part of a volume name.Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
Deletes unused volumes.
Optionalfilters: stringFilters to process on the prune list, encoded as JSON (a map[string][]string). Available filters:
label (label=<key>, label=<key>=<value>, label!=<key>, or label!=<key>=<value>): Prune volumes with (or without, in case label!=... is used) the specified labels.Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
Creates a new volume with the specified configuration.
The configuration options for the volume to be created.
Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
Instructs the driver to remove the specified volume.
The name or ID of the volume to be removed.
Optionalforce: booleanIf true, forces the removal of the volume.
Optionaloptions: RawAxiosRequestConfigOptional HTTP request options to override the default settings.
Entrypoint for the Docker API
Param: config
ConfigurationParameters