@datafire/docker_engine
v4.0.0
Published
DataFire integration for Docker Engine
Downloads
11
Readme
@datafire/docker_engine
Client library for Docker Engine
Installation and Usage
npm install --save @datafire/docker_engine
let docker_engine = require('@datafire/docker_engine').create();
.then(data => {
console.log(data);
});
Description
The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
Most of the client's commands map directly to API endpoints (e.g. docker ps
is GET /containers/json
). The notable exception is running containers, which consists of several API calls.
Errors
The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
{
"message": "page not found"
}
Versioning
The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break.
For Docker Engine 17.09, the API version is 1.32. To lock to this version, you prefix the URL with /v1.32
. For example, calling /info
is the same as calling /v1.32/info
.
Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine.
In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker.
The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons.
This documentation is for version 1.33 of the API. Use this table to find documentation for previous versions of the API:
Docker version | API version | Changes ----------------|-------------|--------- 17.09.x | 1.31 | API changes 17.07.x | 1.31 | API changes 17.06.x | 1.30 | API changes 17.05.x | 1.29 | API changes 17.04.x | 1.28 | API changes 17.03.1 | 1.27 | API changes 1.13.1 & 17.03.0 | 1.26 | API changes 1.13.0 | 1.25 | API changes 1.12.x | 1.24 | API changes 1.11.x | 1.23 | API changes 1.10.x | 1.22 | API changes 1.9.x | 1.21 | API changes 1.8.x | 1.20 | API changes 1.7.x | 1.19 | API changes 1.6.x | 1.18 | API changes
Authentication
Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as POST /images/(name)/push
. These are sent as X-Registry-Auth
header as a Base64 encoded (JSON) string with the following structure:
{
"username": "string",
"password": "string",
"email": "string",
"serveraddress": "string"
}
The serveraddress
is a domain/IP without a protocol. Throughout this structure, double quotes are required.
If you have already got an identity token from the /auth
endpoint, you can just pass this instead of credentials:
{
"identitytoken": "9cbaf023786cd7..."
}
Actions
SystemPing
This is a dummy endpoint you can use to test if the server is accessible.
docker_engine.SystemPing(null, context)
Input
This action has no parameters
Output
- output
string
SystemAuth
Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.
docker_engine.SystemAuth({}, context)
Input
- input
object
- authConfig AuthConfig
Output
- output
object
- IdentityToken
string
: An opaque token used to authenticate a user after a successful login - Status required
string
: The status of the authentication
- IdentityToken
ImageBuild
Build an image from a tar archive with a Dockerfile
in it.
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.
docker_engine.ImageBuild({}, context)
Input
- input
object
- inputStream
string
- dockerfile
string
: Path within the build context to theDockerfile
. This is ignored ifremote
is specified and points to an externalDockerfile
. - t
string
: A name and optional tag to apply to the image in thename:tag
format. If you omit the tag the defaultlatest
value is assumed. You can provide severalt
parameters. - extrahosts
string
: Extra hosts to add to /etc/hosts - remote
string
: A 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 calledDockerfile
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 thedockerfile
parameter is also specified, there must be a file with the corresponding path inside the tarball. - q
boolean
: Suppress verbose build output. - nocache
boolean
: Do not use the cache when building the image. - cachefrom
string
: JSON array of images used for build cache resolution. - pull
string
: Attempt to pull the image even if an older image exists locally. - rm
boolean
: Remove intermediate containers after a successful build. - forcerm
boolean
: Always remove intermediate containers, even upon failure. - memory
integer
: Set memory limit for build. - memswap
integer
: Total memory (memory + swap). Set as-1
to disable swap. - cpushares
integer
: CPU shares (relative weight). - cpusetcpus
string
: CPUs in which to allow execution (e.g.,0-3
,0,1
). - cpuperiod
integer
: The length of a CPU period in microseconds. - cpuquota
integer
: Microseconds of CPU time that the container can get in a CPU period. - buildargs
integer
: JSON 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 theDockerfile
RUN instruction, or for variable expansion in otherDockerfile
instructions. This is not meant for passing secret values. Read more about the buildargs instruction. - shmsize
integer
: Size of/dev/shm
in bytes. The size must be greater than 0. If omitted the system uses 64MB. - squash
boolean
: Squash the resulting images layers into a single layer. (Experimental release only.) - labels
string
: Arbitrary key/value labels to set on the image, as a JSON map of string pairs. - networkmode
string
: Sets the networking mode for the run commands during build. Supported standard values are:bridge
,host
,none
, andcontainer:<name|id>
. Any other value is taken as a custom network's name to which this container should connect to. - Content-type
string
(values: application/x-tar) - X-Registry-Config
string
: This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to.
- inputStream
Output
Output schema unknown
BuildPrune
Delete builder cache
docker_engine.BuildPrune(null, context)
Input
This action has no parameters
Output
- output
object
- SpaceReclaimed
integer
: Disk space reclaimed in bytes
- SpaceReclaimed
ImageCommit
Create a new image from a container
docker_engine.ImageCommit({}, context)
Input
- input
object
- containerConfig ContainerConfig
- container
string
: The ID or name of the container to commit - repo
string
: Repository name for the created image - tag
string
: Tag name for the create image - comment
string
: Commit message - author
string
: Author of the image (e.g.,John Hannibal Smith <[email protected]>
) - pause
boolean
: Whether to pause the container before committing - changes
string
:Dockerfile
instructions to apply while committing
Output
- output IdResponse
ConfigList
List configs
docker_engine.ConfigList({}, context)
Input
- input
object
- filters
string
: A JSON encoded value of the filters (amap[string][]string
) to process on the configs list. Available filters:
- filters
Output
- output
array
- items Config
ConfigCreate
Create a config
docker_engine.ConfigCreate({}, context)
Input
- input
object
- body
- Data
string
: Base64-url-safe-encoded (RFC 4648) - Labels
object
: User-defined key/value metadata. - Name
string
: User-defined name of the config.
- Data
- body
Output
- output
object
- ID
string
: The ID of the created config.
- ID
ConfigDelete
Delete a config
docker_engine.ConfigDelete({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of the config
- id required
Output
Output schema unknown
ConfigInspect
Inspect a config
docker_engine.ConfigInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of the config
- id required
Output
- output Config
ConfigUpdate
Update a Config
docker_engine.ConfigUpdate({
"id": "",
"version": 0
}, context)
Input
- input
object
- id required
string
: The ID or name of the config - body ConfigSpec
- version required
integer
: The version number of the config object being updated. This is required to avoid conflicting writes.
- id required
Output
Output schema unknown
ContainerCreate
Create a container
docker_engine.ContainerCreate({
"body": null
}, context)
Input
- input
object
- name
string
: Assign the specified name to the container. Must match/?[a-zA-Z0-9_-]+
. - body required
- ArgsEscaped
boolean
: Command is already escaped (Windows only) - AttachStderr
boolean
: Whether to attach tostderr
. - AttachStdin
boolean
: Whether to attach tostdin
. - AttachStdout
boolean
: Whether to attach tostdout
. - Cmd
array
,string
: Command to run specified as a string or an array of strings.- items
string
- items
- Domainname
string
: The domain name to use for the container. - Entrypoint
array
,string
: The entry point for the container as a string or an array of strings.- items
string
- items
- Env
array
: A list of environment variables to set inside the container in the form["VAR=value", ...]
. A variable without=
is removed from the environment, rather than to have an empty value.- items
string
- items
- ExposedPorts
object
: An object mapping ports to an empty object in the form: - Healthcheck HealthConfig
- Hostname
string
: The hostname to use for the container, as a valid RFC 1123 hostname. - Image
string
: The name of the image to use when creating the container - Labels
object
: User-defined key/value metadata. - MacAddress
string
: MAC address of the container. - NetworkDisabled
boolean
: Disable networking for the container. - OnBuild
array
:ONBUILD
metadata that were defined in the image'sDockerfile
.- items
string
- items
- OpenStdin
boolean
: Openstdin
- Shell
array
: Shell for whenRUN
,CMD
, andENTRYPOINT
uses a shell.- items
string
- items
- StdinOnce
boolean
: Closestdin
after one attached client disconnects - StopSignal
string
: Signal to stop a container as a string or unsigned integer. - StopTimeout
integer
: Timeout to stop a container in seconds. - Tty
boolean
: Attach standard streams to a TTY, includingstdin
if it is not closed. - User
string
: The user that commands are run as inside the container. - Volumes
object
: An object mapping mount point paths inside the container to empty objects.- additionalProperties
object
(values: [object Object])
- additionalProperties
- WorkingDir
string
: The working directory for commands to run in. - HostConfig HostConfig
- NetworkingConfig
object
: This container's networking configuration.- EndpointsConfig
object
: A mapping of network name to endpoint configuration for that network.
- EndpointsConfig
- ArgsEscaped
- name
Output
- output
object
- Id required
string
: The ID of the created container - Warnings required
array
: Warnings encountered when creating the container- items
string
- items
- Id required
ContainerList
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 .
docker_engine.ContainerList({}, context)
Input
- input
object
- all
boolean
: Return all containers. By default, only running containers are shown - limit
integer
: Return this number of most recently created containers, including non-running ones. - size
boolean
: Return the size of container as fieldsSizeRw
andSizeRootFs
. - filters
string
: Filters to process on the container list, encoded as JSON (amap[string][]string
). For example,{"status": ["paused"]}
will only return paused containers. Available filters:
- all
Output
- output ContainerSummary
ContainerPrune
Delete stopped containers
docker_engine.ContainerPrune({}, context)
Input
- input
object
- filters
string
: Filters to process on the prune list, encoded as JSON (amap[string][]string
).
- filters
Output
- output
object
- ContainersDeleted
array
: Container IDs that were deleted- items
string
- items
- SpaceReclaimed
integer
: Disk space reclaimed in bytes
- ContainersDeleted
ContainerDelete
Remove a container
docker_engine.ContainerDelete({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - v
boolean
: Remove the volumes associated with the container. - force
boolean
: If the container is running, kill it before removing it. - link
boolean
: Remove the specified link associated with the container.
- id required
Output
Output schema unknown
ContainerArchive
Get a tar archive of a resource in the filesystem of container id.
docker_engine.ContainerArchive({
"id": "",
"path": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - path required
string
: Resource in the container’s filesystem to archive.
- id required
Output
Output schema unknown
ContainerArchiveInfo
A response header X-Docker-Container-Path-Stat
is return containing a base64 - encoded JSON object with some filesystem header information about the path.
docker_engine.ContainerArchiveInfo({
"id": "",
"path": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - path required
string
: Resource in the container’s filesystem to archive.
- id required
Output
Output schema unknown
PutContainerArchive
Upload a tar archive to be extracted to a path in the filesystem of container id.
docker_engine.PutContainerArchive({
"id": "",
"path": "",
"inputStream": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - path required
string
: Path to a directory in the container to extract the archive’s contents into. - noOverwriteDirNonDir
string
: If “1”, “true”, or “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. - inputStream required
string
- id required
Output
Output schema unknown
ContainerAttach
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.
Hijacking
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]
Stream format
When the TTY setting is disabled in POST /containers/create
, the stream over the hijacked connected 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:
- 0:
stdin
(is written onstdout
) - 1:
stdout
- 2:
stderr
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:
- Read 8 bytes.
- Choose
stdout
orstderr
depending on the first byte. - Extract the frame size from the last four bytes.
- Read the extracted size and output it on the correct output.
- Goto 1.
Stream format when using a TTY
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
.
docker_engine.ContainerAttach({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - detachKeys
string
: Override the key sequence for detaching a container.Format is a single character[a-Z]
orctrl-<value>
where<value>
is one of:a-z
,@
,^
,[
,,
or_
. - logs
boolean
: Replay previous logs from the container. - stream
boolean
: Stream attached streams from the time the request was made onwards - stdin
boolean
: Attach tostdin
- stdout
boolean
: Attach tostdout
- stderr
boolean
: Attach tostderr
- id required
Output
Output schema unknown
ContainerAttachWebsocket
Attach to a container via a websocket
docker_engine.ContainerAttachWebsocket({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - detachKeys
string
: Override the key sequence for detaching a container.Format is a single character[a-Z]
orctrl-<value>
where<value>
is one of:a-z
,@
,^
,[
,,
, or_
. - logs
boolean
: Return logs - stream
boolean
: Return stream - stdin
boolean
: Attach tostdin
- stdout
boolean
: Attach tostdout
- stderr
boolean
: Attach tostderr
- id required
Output
Output schema unknown
ContainerChanges
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
: Deleted
docker_engine.ContainerChanges({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container
- id required
Output
- output
array
- items
object
- Kind required
integer
(values: 0, 1, 2): Kind of change - Path required
string
: Path to file that has changed
- Kind required
- items
ContainerExec
Run a command inside a running container.
docker_engine.ContainerExec({
"execConfig": {},
"id": ""
}, context)
Input
- input
object
- execConfig required
object
- AttachStderr
boolean
: Attach tostderr
of the exec command. - AttachStdin
boolean
: Attach tostdin
of the exec command. - AttachStdout
boolean
: Attach tostdout
of the exec command. - Cmd
array
: Command to run, as a string or array of strings.- items
string
- items
- DetachKeys
string
: Override the key sequence for detaching a container. Format is a single character[a-Z]
orctrl-<value>
where<value>
is one of:a-z
,@
,^
,[
,,
or_
. - Env
array
: A list of environment variables in the form["VAR=value", ...]
.- items
string
- items
- Privileged
boolean
: Runs the exec process with extended privileges. - Tty
boolean
: Allocate a pseudo-TTY. - User
string
: The user, and optionally, group to run the exec process inside the container. Format is one of:user
,user:group
,uid
, oruid:gid
.
- AttachStderr
- id required
string
: ID or name of container
- execConfig required
Output
- output IdResponse
ContainerExport
Export the contents of a container as a tarball.
docker_engine.ContainerExport({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container
- id required
Output
Output schema unknown
ContainerInspect
Return low-level information about a container.
docker_engine.ContainerInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - size
boolean
: Return the size of container as fieldsSizeRw
andSizeRootFs
- id required
Output
- output
object
- AppArmorProfile
string
- Args
array
: The arguments to the command being run- items
string
- items
- Config ContainerConfig
- Created
string
: The time the container was created - Driver
string
- ExecIDs
string
- GraphDriver GraphDriverData
- HostConfig HostConfig
- HostnamePath
string
- HostsPath
string
- Id
string
: The ID of the container - Image
string
: The container's image - LogPath
string
- MountLabel
string
- Mounts
array
- items MountPoint
- Name
string
- NetworkSettings NetworkSettings
- Node
object
: TODO - Path
string
: The path to the command being run - ProcessLabel
string
- ResolvConfPath
string
- RestartCount
integer
- SizeRootFs
integer
: The total size of all the files in this container. - SizeRw
integer
: The size of files that have been created or changed by this container. - State
object
: The state of the container.- Dead
boolean
- Error
string
- ExitCode
integer
: The last exit code of this container - FinishedAt
string
: The time when this container last exited. - OOMKilled
boolean
: Whether this container has been killed because it ran out of memory. - Paused
boolean
: Whether this container is paused. - Pid
integer
: The process ID of this container - Restarting
boolean
: Whether this container is restarting. - Running
boolean
: Whether this container is running. - StartedAt
string
: The time when this container was last started. - Status
string
(values: created, running, paused, restarting, removing, exited, dead): The status of the container. For example,"running"
or"exited"
.
- Dead
- AppArmorProfile
ContainerKill
Send a POSIX signal to a container, defaulting to killing to the container.
docker_engine.ContainerKill({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - signal
string
: Signal to send to the container as an integer or string (e.g.SIGINT
)
- id required
Output
Output schema unknown
ContainerLogs
Get stdout
and stderr
logs from a container.
Note: This endpoint works only for containers with the json-file
or journald
logging driver.
docker_engine.ContainerLogs({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - follow
boolean
: Return the logs as a stream. - stdout
boolean
: Return logs fromstdout
- stderr
boolean
: Return logs fromstderr
- since
integer
: Only return logs since this time, as a UNIX timestamp - timestamps
boolean
: Add timestamps to every log line - tail
string
: Only return this number of log lines from the end of the logs. Specify as an integer orall
to output all log lines.
- id required
Output
- output
string
ContainerPause
Use the cgroups freezer 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 cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.
docker_engine.ContainerPause({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container
- id required
Output
Output schema unknown
ContainerRename
Rename a container
docker_engine.ContainerRename({
"id": "",
"name": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - name required
string
: New name for the container
- id required
Output
Output schema unknown
ContainerResize
Resize the TTY for a container. You must restart the container for the resize to take effect.
docker_engine.ContainerResize({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - h
integer
: Height of the tty session in characters - w
integer
: Width of the tty session in characters
- id required
Output
Output schema unknown
ContainerRestart
Restart a container
docker_engine.ContainerRestart({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - t
integer
: Number of seconds to wait before killing the container
- id required
Output
Output schema unknown
ContainerStart
Start a container
docker_engine.ContainerStart({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - detachKeys
string
: Override the key sequence for detaching a container. Format is a single character[a-Z]
orctrl-<value>
where<value>
is one of:a-z
,@
,^
,[
,,
or_
.
- id required
Output
Output schema unknown
ContainerStats
This endpoint returns a live stream of a container’s resource usage statistics.
The precpu_stats
is the CPU statistic of last read, which is used
for calculating the CPU usage percentage. It is not the same as 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.
docker_engine.ContainerStats({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - stream
boolean
: Stream the output. If false, the stats will be output once and then it will disconnect.
- id required
Output
- output
object
ContainerStop
Stop a container
docker_engine.ContainerStop({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - t
integer
: Number of seconds to wait before killing the container
- id required
Output
Output schema unknown
ContainerTop
On Unix systems, this is done by running the ps
command. This endpoint is not supported on Windows.
docker_engine.ContainerTop({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - ps_args
string
: The arguments to pass tops
. For example,aux
- id required
Output
- output
object
- Processes
array
: Each process running in the container, where each is process is an array of values corresponding to the titles- items
array
- items
string
- items
- items
- Titles
array
: The ps column titles- items
string
- items
- Processes
ContainerUnpause
Resume a container which has been paused.
docker_engine.ContainerUnpause({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container
- id required
Output
Output schema unknown
ContainerUpdate
Change various configuration options of a container without having to recreate it.
docker_engine.ContainerUpdate({
"id": "",
"update": null
}, context)
Input
- input
object
- id required
string
: ID or name of the container - update required
- BlkioDeviceReadBps
array
: Limit read rate (bytes per second) from a device, in the form[{"Path": "device_path", "Rate": rate}]
.- items ThrottleDevice
- BlkioDeviceReadIOps
array
: Limit read rate (IO per second) from a device, in the form[{"Path": "device_path", "Rate": rate}]
.- items ThrottleDevice
- BlkioDeviceWriteBps
array
: Limit write rate (bytes per second) to a device, in the form[{"Path": "device_path", "Rate": rate}]
.- items ThrottleDevice
- BlkioDeviceWriteIOps
array
: Limit write rate (IO per second) to a device, in the form[{"Path": "device_path", "Rate": rate}]
.- items ThrottleDevice
- BlkioWeight
integer
: Block IO weight (relative weight). - BlkioWeightDevice
array
: Block IO weight (relative device weight) in the form[{"Path": "device_path", "Weight": weight}]
.- items
object
- Path
string
- Weight
integer
- Path
- items
- CgroupParent
string
: Path tocgroups
under which the container'scgroup
is created. If the path is not absolute, the path is considered to be relative to thecgroups
path of the init process. Cgroups are created if they do not already exist. - CpuCount
integer
: The number of usable CPUs (Windows only). - CpuPercent
integer
: The usable percentage of the available CPUs (Windows only). - CpuPeriod
integer
: The length of a CPU period in microseconds. - CpuQuota
integer
: Microseconds of CPU time that the container can get in a CPU period. - CpuRealtimePeriod
integer
: The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - CpuRealtimeRuntime
integer
: The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. - CpuShares
integer
: An integer value representing this container's relative CPU weight versus other containers. - CpusetCpus
string
: CPUs in which to allow execution (e.g.,0-3
,0,1
) - CpusetMems
string
: Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. - DeviceCgroupRules
array
: a list of cgroup rules to apply to the container- items
string
- items
- Devices
array
: A list of devices to add to the container.- items DeviceMapping
- DiskQuota
integer
: Disk limit (in bytes). - IOMaximumBandwidth
integer
: Maximum IO in bytes per second for the container system drive (Windows only) - IOMaximumIOps
integer
: Maximum IOps for the container system drive (Windows only) - KernelMemory
integer
: Kernel memory limit in bytes. - Memory
integer
: Memory limit in bytes. - MemoryReservation
integer
: Memory soft limit in bytes. - MemorySwap
integer
: Total memory limit (memory + swap). Set as-1
to enable unlimited swap. - MemorySwappiness
integer
: Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. - NanoCPUs
integer
: CPU quota in units of 10-9 CPUs. - OomKillDisable
boolean
: Disable OOM Killer for the container. - PidsLimit
integer
: Tune a container's pids limit. Set -1 for unlimited. - Ulimits
array
: A list of resource limits to set in the container. For example:{"Name": "nofile", "Soft": 1024, "Hard": 2048}
"- items
object
- Hard
integer
: Hard limit - Name
string
: Name of ulimit - Soft
integer
: Soft limit
- Hard
- items
- RestartPolicy RestartPolicy
- BlkioDeviceReadBps
- id required
Output
- output
object
- Warnings
array
- items
string
- items
- Warnings
ContainerWait
Block until a container stops, then returns the exit code.
docker_engine.ContainerWait({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the container - condition
string
: Wait until a container state reaches the given condition, either 'not-running' (default), 'next-exit', or 'removed'.
- id required
Output
- output
object
- StatusCode required
integer
: Exit code of the container
- StatusCode required
DistributionInspect
Return image digest and platform information by contacting the registry.
docker_engine.DistributionInspect({
"name": ""
}, context)
Input
- input
object
- name required
string
: Image name or id
- name required
Output
- output
object
- Descriptor required
object
: A descriptor struct containing digest, media type, and size- Digest
string
- MediaType
string
- Size
integer
- URLs
array
- items
string
- items
- Digest
- Platforms required
array
: An array containing all platforms supported by the image- items
object
- Architecture
string
- Features
array
- items
string
- items
- OS
string
- OSFeatures
array
- items
string
- items
- OSVersion
string
- Variant
string
- Architecture
- items
- Descriptor required
SystemEvents
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
, export
, health_status
, kill
, oom
, pause
, rename
, resize
, restart
, start
, stop
, top
, unpause
, and update
Images report these events: delete
, import
, load
, pull
, push
, save
, tag
, and untag
Volumes report these events: create
, mount
, unmount
, and destroy
Networks report these events: create
, connect
, disconnect
, destroy
, update
, and remove
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
docker_engine.SystemEvents({}, context)
Input
- input
object
- since
string
: Show events created since this timestamp then stream new events. - until
string
: Show events created until this timestamp then stop streaming. - filters
string
: A JSON encoded value of filters (amap[string][]string
) to process on the event list. Available filters:
- since
Output
- output
object
- Action
string
: The type of event - Actor
object
- Attributes
object
: Various key/value attributes of the object, depending on its type - ID
string
: The ID of the object emitting the event
- Attributes
- Type
string
: The type of object emitting the event - time
integer
: Timestamp of event - timeNano
integer
: Timestamp of event, with nanosecond accuracy
- Action
ExecInspect
Return low-level information about an exec instance.
docker_engine.ExecInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: Exec instance ID
- id required
Output
- output
object
- ContainerID
string
- ExitCode
integer
- ID
string
- OpenStderr
boolean
- OpenStdin
boolean
- OpenStdout
boolean
- Pid
integer
: The system process ID for the exec process. - ProcessConfig ProcessConfig
- Running
boolean
- ContainerID
ExecResize
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.
docker_engine.ExecResize({
"id": ""
}, context)
Input
- input
object
- id required
string
: Exec instance ID - h
integer
: Height of the TTY session in characters - w
integer
: Width of the TTY session in characters
- id required
Output
Output schema unknown
ExecStart
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.
docker_engine.ExecStart({
"id": ""
}, context)
Input
- input
object
- execStartConfig
object
- Detach
boolean
: Detach from the command. - Tty
boolean
: Allocate a pseudo-TTY.
- Detach
- id required
string
: Exec instance ID
- execStartConfig
Output
Output schema unknown
ImageCreate
Create an image by either pulling it from a registry or importing it.
docker_engine.ImageCreate({}, context)
Input
- input
object
- fromImage
string
: Name 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. - fromSrc
string
: Source 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. - repo
string
: Repository 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. - tag
string
: Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. - inputImage
string
- X-Registry-Auth
string
: A base64-encoded auth configuration. See the authentication section for details.
- fromImage
Output
Output schema unknown
ImageGetAll
Get a tarball containing all images and metadata for several image repositories.
For each value of the names
parameter: if it is a specific name and tag (e.g. ubuntu:latest
), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID.
For details on the format, see the export image endpoint.
docker_engine.ImageGetAll({}, context)
Input
- input
object
- names
array
: Image names to filter by
- names
Output
- output
string
ImageList
Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.
docker_engine.ImageList({}, context)
Input
- input
object
- all
boolean
: Show all images. Only images from a final layer (no children) are shown by default. - filters
string
: A JSON encoded value of the filters (amap[string][]string
) to process on the images list. Available filters: - digests
boolean
: Show digest information as aRepoDigests
field on each image.
- all
Output
- output
array
- items ImageSummary
ImageLoad
Load a set of images and tags into a repository.
For details on the format, see the export image endpoint.
docker_engine.ImageLoad({}, context)
Input
- input
object
- imagesTarball
string
- quiet
boolean
: Suppress progress details during load.
- imagesTarball
Output
Output schema unknown
ImagePrune
Delete unused images
docker_engine.ImagePrune({}, context)
Input
- input
object
- filters
string
: Filters to process on the prune list, encoded as JSON (amap[string][]string
). Available filters:
- filters
Output
- output
object
- ImagesDeleted
array
: Images that were deleted- items ImageDeleteResponseItem
- SpaceReclaimed
integer
: Disk space reclaimed in bytes
- ImagesDeleted
ImageSearch
Search for an image on Docker Hub.
docker_engine.ImageSearch({
"term": ""
}, context)
Input
- input
object
- term required
string
: Term to search - limit
integer
: Maximum number of results to return - filters
string
: A JSON encoded value of the filters (amap[string][]string
) to process on the images list. Available filters:
- term required
Output
- output
array
- items
object
- description
string
- is_automated
boolean
- is_official
boolean
- name
string
- star_count
integer
- description
- items
ImageDelete
Remove an image, along with any untagged parent images that were referenced by that image.
Images can't be removed if they have descendant images, are being used by a running container or are being used by a build.
docker_engine.ImageDelete({
"name": ""
}, context)
Input
- input
object
- name required
string
: Image name or ID - force
boolean
: Remove the image even if it is being used by stopped containers or has other tags - noprune
boolean
: Do not delete untagged parent images
- name required
Output
- output
array
- items ImageDeleteResponseItem
ImageGet
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.
Image tarball format
An image tarball contains one directory per image layer (named using its long ID), each containing these files:
VERSION
: currently1.0
- the file format versionjson
: detailed layer information, similar todocker inspect layer_id
layer.tar
: A tarfile containing the filesystem changes in this layer
The 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"
}
}
docker_engine.ImageGet({
"name": ""
}, context)
Input
- input
object
- name required
string
: Image name or ID
- name required
Output
- output
string
ImageHistory
Return parent layers of an image.
docker_engine.ImageHistory({
"name": ""
}, context)
Input
- input
object
- name required
string
: Image name or ID
- name required
Output
- output
array
- items
object
- Comment required
string
- Created required
integer
- CreatedBy required
string
- Id required
string
- Size required
integer
- Tags required
array
- items
string
- items
- Comment required
- items
ImageInspect
Return low-level information about an image.
docker_engine.ImageInspect({
"name": ""
}, context)
Input
- input
object
- name required
string
: Image name or id
- name required
Output
- output Image
ImagePush
Push an image to a registry.
If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, registry.example.com/myimage:latest
.
The push is cancelled if the HTTP connection is closed.
docker_engine.ImagePush({
"name": "",
"X-Registry-Auth": ""
}, context)
Input
- input
object
- name required
string
: Image name or ID. - tag
string
: The tag to associate with the image on the registry. - X-Registry-Auth required
string
: A base64-encoded auth configuration. See the authentication section for details.
- name required
Output
Output schema unknown
ImageTag
Tag an image so that it becomes part of a repository.
docker_engine.ImageTag({
"name": ""
}, context)
Input
- input
object
- name required
string
: Image name or ID to tag. - repo
string
: The repository to tag in. For example,someuser/someimage
. - tag
string
: The name of the new tag.
- name required
Output
Output schema unknown
SystemInfo
Get system information
docker_engine.SystemInfo(null, context)
Input
This action has no parameters
Output
- output SystemInfo
NetworkList
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.
docker_engine.NetworkList({}, context)
Input
- input
object
- filters
string
: JSON encoded value of the filters (amap[string][]string
) to process on the networks list. Available filters:
- filters
Output
- output
array
- items Network
NetworkCreate
Create a network
docker_engine.NetworkCreate({
"networkConfig": {
"Name": ""
}
}, context)
Input
- input
object
- networkConfig required
object
- Attachable
boolean
: Globally scoped network is manually attachable by regular containers from workers in swarm mode. - CheckDuplicate
boolean
: Check for networks with duplicate names. Since Network is primarily keyed based on a random ID and not on the name, and network name is strictly a user-friendly alias to the network which is uniquely identified using ID, there is no guaranteed way to check for duplicates. CheckDuplicate is there to provide a best effort checking of any networks which has the same name but it is not guaranteed to catch all name collisions. - Driver
string
: Name of the network driver plugin to use. - EnableIPv6
boolean
: Enable IPv6 on the network. - IPAM IPAM
- Ingress
boolean
: Ingress network is the network which provides the routing-mesh in swarm mode. - Internal
boolean
: Restrict external access to the network. - Labels
object
: User-defined key/value metadata. - Name required
string
: The network's name. - Options
object
: Network specific options to be used by the drivers.
- Attachable
- networkConfig required
Output
- output
object
- Id
string
: The ID of the created network. - Warning
string
- Id
NetworkPrune
Delete unused networks
docker_engine.NetworkPrune({}, context)
Input
- input
object
- filters
string
: Filters to process on the prune list, encoded as JSON (amap[string][]string
).
- filters
Output
- output
object
- NetworksDeleted
array
: Networks that were deleted- items
string
- items
- NetworksDeleted
NetworkDelete
Remove a network
docker_engine.NetworkDelete({
"id": ""
}, context)
Input
- input
object
- id required
string
: Network ID or name
- id required
Output
Output schema unknown
NetworkInspect
Inspect a network
docker_engine.NetworkInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: Network ID or name - verbose
boolean
: Detailed inspect output for troubleshooting - scope
string
: Filter the network by scope (swarm, global, or local)
- id required
Output
- output Network
NetworkConnect
Connect a container to a network
docker_engine.NetworkConnect({
"id": "",
"container": {}
}, context)
Input
- input
object
- id required
string
: Network ID or name - container required
object
- Container
string
: The ID or name of the container to connect to the network. - EndpointConfig EndpointSettings
- Container
- id required
Output
Output schema unknown
NetworkDisconnect
Disconnect a container from a network
docker_engine.NetworkDisconnect({
"id": "",
"container": {}
}, context)
Input
- input
object
- id required
string
: Network ID or name - container required
object
- Container
string
: The ID or name of the container to disconnect from the network. - Force
boolean
: Force the container to disconnect from the network.
- Container
- id required
Output
Output schema unknown
NodeList
List nodes
docker_engine.NodeList({}, context)
Input
- input
object
- filters
string
: Filters to process on the nodes list, encoded as JSON (amap[string][]string
).
- filters
Output
- output
array
- items Node
NodeDelete
Delete a node
docker_engine.NodeDelete({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID or name of the node - force
boolean
: Force remove a node from the swarm
- id required
Output
Output schema unknown
NodeInspect
Inspect a node
docker_engine.NodeInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: The ID or name of the node
- id required
Output
- output Node
NodeUpdate
Update a node
docker_engine.NodeUpdate({
"id": "",
"version": 0
}, context)
Input
- input
object
- id required
string
: The ID of the node - body NodeSpec
- version required
integer
: The version number of the node object being updated. This is required to avoid conflicting writes.
- id required
Output
Output schema unknown
PluginList
Returns information about installed plugins.
docker_engine.PluginList({}, context)
Input
- input
object
- filters
string
: A JSON encoded value of the filters (amap[string][]string
) to process on the plugin list. Available filters:
- filters
Output
- output
array
- items Plugin
PluginCreate
Create a plugin
docker_engine.PluginCreate({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted. - tarContext
string
- name required
Output
Output schema unknown
GetPluginPrivileges
Get plugin privileges
docker_engine.GetPluginPrivileges({
"remote": ""
}, context)
Input
- input
object
- remote required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted.
- remote required
Output
- output
array
- items
object
: Describes a permission the user has to accept upon installing the plugin.- Description
string
- Name
string
- Value
array
- items
string
- items
- Description
- items
PluginPull
Pulls and installs a plugin. After the plugin is installed, it can be enabled using the POST /plugins/{name}/enable
endpoint.
docker_engine.PluginPull({
"remote": ""
}, context)
Input
- input
object
- remote required
string
: Remote reference for plugin to install. - name
string
: Local name for the pulled plugin. - X-Registry-Auth
string
: A base64-encoded auth configuration to use when pulling a plugin from a registry. See the authentication section for details. - body
array
- items
object
: Describes a permission accepted by the user upon installing the plugin.- Description
string
- Name
string
- Value
array
- items
string
- items
- Description
- items
- remote required
Output
Output schema unknown
PluginDelete
Remove a plugin
docker_engine.PluginDelete({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted. - force
boolean
: Disable the plugin before removing. This may result in issues if the plugin is in use by a container.
- name required
Output
- output Plugin
PluginDisable
Disable a plugin
docker_engine.PluginDisable({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted.
- name required
Output
Output schema unknown
PluginEnable
Enable a plugin
docker_engine.PluginEnable({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted. - timeout
integer
: Set the HTTP client timeout (in seconds)
- name required
Output
Output schema unknown
PluginInspect
Inspect a plugin
docker_engine.PluginInspect({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted.
- name required
Output
- output Plugin
PluginPush
Push a plugin to the registry.
docker_engine.PluginPush({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted.
- name required
Output
Output schema unknown
PluginSet
Configure a plugin
docker_engine.PluginSet({
"name": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted. - body
array
- items
string
- items
- name required
Output
Output schema unknown
PluginUpgrade
Upgrade a plugin
docker_engine.PluginUpgrade({
"name": "",
"remote": ""
}, context)
Input
- input
object
- name required
string
: The name of the plugin. The:latest
tag is optional, and is the default if omitted. - remote required
string
: Remote reference to upgrade to. - X-Registry-Auth
string
: A base64-encoded auth configuration to use when pulling a plugin from a registry. See the authentication section for details. - body
array
- items
object
: Describes a permission accepted by the user upon installing the plugin.- Description
string
- Name
string
- Value
array
- items
string
- items
- Description
- items
- name required
Output
Output schema unknown
SecretList
List secrets
docker_engine.SecretList({}, context)
Input
- input
object
- filters
string
: A JSON encoded value of the filters (amap[string][]string
) to process on the secrets list. Available filters:
- filters
Output
- output
array
- items Secret
SecretCreate
Create a secret
docker_engine.SecretCreate({}, context)
Input
- input
object
Output
- output
object
- ID
string
: The ID of the created secret.
- ID
SecretDelete
Delete a secret
docker_engine.SecretDelete({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of the secret
- id required
Output
Output schema unknown
SecretInspect
Inspect a secret
docker_engine.SecretInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID of the secret
- id required
Output
- output Secret
SecretUpdate
Update a Secret
docker_engine.SecretUpdate({
"id": "",
"version": 0
}, context)
Input
- input
object
- id required
string
: The ID or name of the secret - body SecretSpec
- version required
integer
: The version number of the secret object being updated. This is required to avoid conflicting writes.
- id required
Output
Output schema unknown
ServiceList
List services
docker_engine.ServiceList({}, context)
Input
- input
object
- filters
string
: A JSON encoded value of the filters (amap[string][]string
) to process on the services list. Available filters:
- filters
Output
- output
array
- items Service
ServiceCreate
Create a service
docker_engine.ServiceCreate({
"body": null
}, context)
Input
- input
object
- body required
- EndpointSpec EndpointSpec
- Labels
object
: User-defined key/value metadata. - Mode
object
: Scheduling mode for the service.- Global
object
- Replicated
object
- Replicas
integer
- Replicas
- Global
- Name
string
: Name of the service. - Networks
array
: Array of network names or IDs to attach the service to.- items
object
- Aliases
array
- items
string
- items
- Target
string
- Aliases
- items
- RollbackConfig
object
: Specification for the rollback strategy of the service.- Delay
integer
: Amount of time between rollback iterations, in nanoseconds. - FailureAction
string
(values: continue, pause): Action to take if an rolled back task fails to run, or stops running during the rollback. - MaxFailureRatio
number
: The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1. - Monitor
integer
: Amount of time to monitor each rolled back task for failures, in nanoseconds. - Order
string
(values: stop-first, start-first): The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. - Parallelism
integer
: Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism).
- Delay
- TaskTemplate TaskSpec
- UpdateConfig
object
: Specification for the update strategy of the service.- Delay
integer
: Amount of time between updates, in nanoseconds. - FailureAction
string
(values: continue, pause, rollback): Action to take if an updated task fails to run, or stops running during the update. - MaxFailureRatio
number
: The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. - Monitor
integer
: Amount of time to monitor each updated task for failures, in nanoseconds. - Order
string
(values: stop-first, start-first): The order of operations when rolling out an updated task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. - Parallelism
integer
: Maximum number of tasks to be updated in one iteration (0 means unlimited parallelism).
- Delay
- X-Registry-Auth
string
: A base64-encoded auth configuration for pulling from private registries. See the authentication section for details.
- body required
Output
- output
object
- ID
string
: The ID of the created service. - Warning
string
: Optional warning message
- ID
ServiceDelete
Delete a service
docker_engine.ServiceDelete({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of service.
- id required
Output
Output schema unknown
ServiceInspect
Inspect a service
docker_engine.ServiceInspect({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of service. - insertDefaults
boolean
: Fill empty fields with default values.
- id required
Output
- output Service
ServiceLogs
Get stdout
and stderr
logs from a service.
Note: This endpoint works only for services with the json-file
or journald
logging drivers.
docker_engine.ServiceLogs({
"id": ""
}, context)
Input
- input
object
- id required
string
: ID or name of the service - details
boolean
: Show service context and extra details provided to logs. - follow
boolean
: Return the logs as a stream. - stdout
boolean
: Return logs fromstdout
- stderr
boolean
: Return logs fromstderr
- since
integer
: Only return logs since this time, as a UNIX timestamp - timestamps
boolean
: Add timestamps to every log line - tail
string
: Only return this number of log lines from the end of the logs. Specify as an integer orall
to output all log lines.
- id required
Output
- output
string
ServiceUpdate
Update a service
docker_engine.ServiceUpdate({
"id": "",
"body": null,
"version": 0
}, context)
Input
- input
object
- id required
string
: ID or name of service. - body required
- EndpointSpec EndpointSpec
- Labels
object
: User-defined key/value metadata. - Mode
object
: Scheduling mode for the service.- Global
object
- Replicated
object
- Replicas
integer
- Replicas
- Global
- Name
string
: Name of the service. - Networks
array
: Array of network names or IDs to attach the service to.- items
object
- Aliases
array
- items
string
- items
- Target
string
- Aliases
- items
- RollbackConfig
object
: Specification for the rollback strategy of the service.- Delay
integer
: Amount of time between rollback iterations, in nanoseconds. - FailureAction
string
(values: continue, pause): Action to take if an rolled back task fails to run, or stops running during the rollback. - MaxFailureRatio
number
: The fraction of tasks that may fail during a rollback before the failure action is invoked, specified as a floating point number between 0 and 1. - Monitor
integer
: Amount of time to monitor each rolled back task for failures, in nanoseconds. - Order
string
(values: stop-first, start-first): The order of operations when rolling back a task. Either the old task is shut down before the new task is started, or the new task is started before the old task is shut down. - Parallelism
integer
: Maximum number of tasks to be rolled back in one iteration (0 means unlimited parallelism).
- Delay
- TaskTemplate TaskSpec
- UpdateConfig
object
: Specification for the update strategy of the service.- Delay
integer
: Amount of time between updates, in nanoseconds. - FailureAction
string
(values: continue, pause, rollback): Action to take if an updated task fails to run, or stops running during the update. - MaxFailureRatio
number
: The fraction of tasks that may fail during an update before the failure action is invoked, specified as a floating point number between 0 and 1. - Monitor
integer
: Amount of time to monitor each updated task for failures, in nanoseconds. - Order
- Delay
- id required