2016-10-14 22:30:36 +00:00
---
2016-11-15 19:45:20 +00:00
title: "Engine API version history"
2016-11-21 15:30:57 +00:00
description: "Documentation of changes that have been made to Engine API."
2016-11-03 22:48:30 +00:00
keywords: "API, Docker, rcli, REST, documentation"
2016-10-14 22:30:36 +00:00
---
2014-04-16 00:53:12 +00:00
2017-10-04 16:38:09 +00:00
<!-- This file is maintained within the moby/moby GitHub
repository at https://github.com/moby/moby/. Make all
2016-10-19 17:25:45 +00:00
pull requests against that repo. If you see this file in
another repository, consider it read-only there, as it will
periodically be overwritten by the definitive file. Pull
requests which include edits to this file in other repositories
will be rejected.
-->
2022-07-12 08:35:48 +00:00
## v1.43 API changes
[Docker Engine API v1.43 ](https://docs.docker.com/engine/api/v1.43/ ) documentation
2023-02-17 20:06:19 +00:00
* `POST /containers/create` now accepts `Annotations` as part of `HostConfig` .
Can be used to attach arbitrary metadata to the container, which will also be
passed to the runtime when the container is started.
2023-02-23 14:40:26 +00:00
* `GET /images/json` no longer includes hardcoded `<none>:<none>` and
`<none>@<none>` in `RepoTags` and`RepoDigests` for untagged images.
In such cases, empty arrays will be produced instead.
2023-04-17 11:15:57 +00:00
* The `VirtualSize` field in the `GET /images/{name}/json` and `GET /images//json`
responses is deprecated and will no longer be included in API v1.44. Use the
`Size` field instead, which contains the same information.
2023-04-13 11:27:59 +00:00
* `GET /info` now includes `no-new-privileges` in the `SecurityOptions` string
list when this option is enabled globally. This change is not versioned, and
affects all API versions if the daemon has this patch.
2022-07-12 08:35:48 +00:00
2021-02-23 17:29:34 +00:00
## v1.42 API changes
[Docker Engine API v1.42 ](https://docs.docker.com/engine/api/v1.42/ ) documentation
2021-07-08 11:30:05 +00:00
* Removed the `BuilderSize` field on the `GET /system/df` endpoint. This field
was introduced in API 1.31 as part of an experimental feature, and no longer
used since API 1.40.
Use field `BuildCache` instead to track storage used by the builder component.
2021-08-22 10:46:43 +00:00
* `POST /containers/{id}/stop` and `POST /containers/{id}/restart` now accept a
`signal` query parameter, which allows overriding the container's default stop-
signal.
2021-06-28 15:30:53 +00:00
* `GET /images/json` now accepts query parameter `shared-size` . When set `true` ,
images returned will include `SharedSize` , which provides the size on disk shared
with other images present on the system.
2021-06-23 13:26:54 +00:00
* `GET /system/df` now accepts query parameter `type` . When set,
computes and returns data only for the specified object type.
The parameter can be specified multiple times to select several object types.
Supported values are: `container` , `image` , `volume` , `build-cache` .
2021-08-10 12:49:26 +00:00
* `GET /system/df` can now be used concurrently. If a request is made while a
previous request is still being processed, the request will receive the result
of the already running calculation, once completed. Previously, an error
(`a disk usage operation is already running`) would be returned in this
situation. This change is not versioned, and affects all API versions if the
daemon has this patch.
2021-12-22 16:21:27 +00:00
* The `POST /images/create` now supports both the operating system and architecture
that is passed through the `platform` query parameter when using the `fromSrc`
option to import an image from an archive. Previously, only the operating system
was used and the architecture was ignored. If no `platform` option is set, the
host's operating system and architecture as used as default. This change is not
versioned, and affects all API versions if the daemon has this patch.
2022-02-14 09:29:29 +00:00
* The `POST /containers/{id}/wait` endpoint now returns a `400` status code if an
invalid `condition` is provided (on API 1.30 and up).
2021-09-21 07:58:31 +00:00
* Removed the `KernelMemory` field from the `POST /containers/create` and
2022-02-07 16:09:23 +00:00
`POST /containers/{id}/update` endpoints, any value it is set to will be ignored
on API version `v1.42` and up. Older API versions still accept this field, but
may take no effect, depending on the kernel version and OCI runtime in use.
2022-02-07 17:06:57 +00:00
* `GET /containers/{id}/json` now omits the `KernelMemory` and `KernelMemoryTCP`
if they are not set.
2022-02-07 16:09:23 +00:00
* `GET /info` now omits the `KernelMemory` and `KernelMemoryTCP` if they are not
supported by the host or host's configuration (if cgroups v2 are in use).
2022-05-29 11:45:12 +00:00
* `GET /_ping` and `HEAD /_ping` now return `Builder-Version` by default.
This header contains the default builder to use, and is a recommendation as
advertised by the daemon. However, it is up to the client to choose which builder
to use.
The default value on Linux is version "2" (BuildKit), but the daemon can be
configured to recommend version "1" (classic Builder). Windows does not yet
support BuildKit for native Windows images, and uses "1" (classic builder) as
a default.
This change is not versioned, and affects all API versions if the daemon has
this patch.
2021-02-23 17:21:37 +00:00
* `GET /_ping` and `HEAD /_ping` now return a `Swarm` header, which allows a
client to detect if Swarm is enabled on the daemon, without having to call
additional endpoints.
This change is not versioned, and affects all API versions if the daemon has
this patch. Clients must consider this header "optional", and fall back to
using other endpoints to get this information if the header is not present.
The `Swarm` header can contain one of the following values:
- "inactive"
- "pending"
- "error"
- "locked"
- "active/worker"
- "active/manager"
2022-03-13 06:01:28 +00:00
* `POST /containers/create` for Windows containers now accepts a new syntax in
`HostConfig.Resources.Devices.PathOnHost` . As well as the existing `class/<GUID>`
syntax, `<IDType>://<ID>` is now recognised. Support for specific `<IDType>` values
depends on the underlying implementation and Windows version. This change is not
versioned, and affects all API versions if the daemon has this patch.
2019-08-28 11:46:32 +00:00
* `GET /containers/{id}/attach` , `GET /exec/{id}/start` , `GET /containers/{id}/logs`
`GET /services/{id}/logs` and `GET /tasks/{id}/logs` now set Content-Type header
to `application/vnd.docker.multiplexed-stream` when a multiplexed stdout/stderr
stream is sent to client, `application/vnd.docker.raw-stream` otherwise.
2021-05-14 17:38:50 +00:00
* `POST /volumes/create` now accepts a new `ClusterVolumeSpec` to create a cluster
volume (CNI). This option can only be used if the daemon is a Swarm manager.
The Volume response on creation now also can contain a `ClusterVolume` field
with information about the created volume.
2022-05-23 10:56:39 +00:00
* The `BuildCache.Parent` field, as returned by `GET /system/df` is deprecated
and is now omitted. API versions before v1.42 continue to include this field.
2022-08-02 07:49:29 +00:00
* `GET /system/df` now includes a new `Parents` field, for "build-cache" records,
which contains a list of parent IDs for the build-cache record.
2021-05-14 17:38:50 +00:00
* Volume information returned by `GET /volumes/{name}` , `GET /volumes` and
`GET /system/df` can now contain a `ClusterVolume` if the volume is a cluster
volume (requires the daemon to be a Swarm manager).
* The `Volume` type, as returned by `Added new ` ClusterVolume` fields
* Added a new `PUT /volumes{name}` endpoint to update cluster volumes (CNI).
Cluster volumes are only supported if the daemon is a Swarm manager.
2022-05-18 09:02:14 +00:00
* `GET /containers/{name}/attach/ws` endpoint now accepts `stdin` , `stdout` and
`stderr` query parameters to only attach to configured streams.
NOTE: These parameters were documented before in older API versions, but not
actually supported. API versions before v1.42 continue to ignore these parameters
and default to attaching to all streams. To preserve the pre-v1.42 behavior,
set all three query parameters (`?stdin=1,stdout=1,stderr=1`).
2022-05-12 12:54:44 +00:00
* `POST /containers/create` on Linux now respects the `HostConfig.ConsoleSize` property.
Container is immediately created with the desired terminal size and clients no longer
need to set the desired size on their own.
2022-04-13 10:08:21 +00:00
* `POST /containers/create` allow to set `CreateMountpoint` for host path to be
created if missing. This brings parity with `Binds`
* `POST /containers/create` rejects request if BindOptions|VolumeOptions|TmpfsOptions
is set with a non-matching mount Type.
2022-06-15 07:28:20 +00:00
* `POST /containers/{id}/exec` now accepts an optional `ConsoleSize` parameter.
It allows to set the console size of the executed process immediately when it's created.
2022-09-28 19:43:45 +00:00
* `POST /volumes/prune` will now only prune "anonymous" volumes (volumes which were not given a name) by default. A new filter parameter `all` can be set to a truth-y value (`true`, `1` ) to get the old behavior.
2021-07-08 11:30:05 +00:00
2019-05-13 21:55:20 +00:00
## v1.41 API changes
[Docker Engine API v1.41 ](https://docs.docker.com/engine/api/v1.41/ ) documentation
API: add "prune" events
This patch adds a new "prune" event type to indicate that pruning of a resource
type completed.
This event-type can be used on systems that want to perform actions after
resources have been cleaned up. For example, Docker Desktop performs an fstrim
after resources are deleted (https://github.com/linuxkit/linuxkit/tree/v0.7/pkg/trim-after-delete).
While the current (remove, destroy) events can provide information on _most_
resources, there is currently no event triggered after the BuildKit build-cache
is cleaned.
Prune events have a `reclaimed` attribute, indicating the amount of space that
was reclaimed (in bytes). The attribute can be used, for example, to use as a
threshold for performing fstrim actions. Reclaimed space for `network` events
will always be 0, but the field is added to be consistent with prune events for
other resources.
To test this patch:
Create some resources:
for i in foo bar baz; do \
docker network create network_$i \
&& docker volume create volume_$i \
&& docker run -d --name container_$i -v volume_$i:/volume busybox sh -c 'truncate -s 5M somefile; truncate -s 5M /volume/file' \
&& docker tag busybox:latest image_$i; \
done;
docker pull alpine
docker pull nginx:alpine
echo -e "FROM busybox\nRUN truncate -s 50M bigfile" | DOCKER_BUILDKIT=1 docker build -
Start listening for "prune" events in another shell:
docker events --filter event=prune
Prune containers, networks, volumes, and build-cache:
docker system prune -af --volumes
See the events that are returned:
docker events --filter event=prune
2020-07-25T12:12:09.268491000Z container prune (reclaimed=15728640)
2020-07-25T12:12:09.447890400Z network prune (reclaimed=0)
2020-07-25T12:12:09.452323000Z volume prune (reclaimed=15728640)
2020-07-25T12:12:09.517236200Z image prune (reclaimed=21568540)
2020-07-25T12:12:09.566662600Z builder prune (reclaimed=52428841)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-25 12:14:38 +00:00
* `GET /events` now returns `prune` events after pruning resources have completed.
Prune events are returned for `container` , `network` , `volume` , `image` , and
`builder` , and have a `reclaimed` attribute, indicating the amount of space
reclaimed (in bytes).
2020-07-20 12:36:57 +00:00
* `GET /info` now returns a `CgroupVersion` field, containing the cgroup version.
* `GET /info` now returns a `DefaultAddressPools` field, containing a list of
custom default address pools for local networks, which can be specified in the
`daemon.json` file or `--default-address-pool` dockerd option.
2019-02-23 14:53:28 +00:00
* `POST /services/create` and `POST /services/{id}/update` now supports `BindOptions.NonRecursive` .
2020-03-03 17:00:56 +00:00
* The `ClusterStore` and `ClusterAdvertise` fields in `GET /info` are deprecated
and are now omitted if they contain an empty value. This change is not versioned,
and affects all API versions if the daemon has this patch.
2020-02-10 16:17:07 +00:00
* The `filter` (singular) query parameter, which was deprecated in favor of the
`filters` option in Docker 1.13, has now been removed from the `GET /images/json`
endpoint. The parameter remains available when using API version 1.40 or below.
2021-04-07 20:29:07 +00:00
* `GET /services` now returns `CapAdd` and `CapDrop` as part of the `ContainerSpec` .
2020-07-23 18:03:15 +00:00
* `GET /services/{id}` now returns `CapAdd` and `CapDrop` as part of the `ContainerSpec` .
* `POST /services/create` now accepts `CapAdd` and `CapDrop` as part of the `ContainerSpec` .
* `POST /services/{id}/update` now accepts `CapAdd` and `CapDrop` as part of the `ContainerSpec` .
* `GET /tasks` now returns `CapAdd` and `CapDrop` as part of the `ContainerSpec` .
* `GET /tasks/{id}` now returns `CapAdd` and `CapDrop` as part of the `ContainerSpec` .
2020-05-08 19:11:51 +00:00
* `GET /services` now returns `Pids` in `TaskTemplate.Resources.Limits` .
* `GET /services/{id}` now returns `Pids` in `TaskTemplate.Resources.Limits` .
* `POST /services/create` now accepts `Pids` in `TaskTemplate.Resources.Limits` .
* `POST /services/{id}/update` now accepts `Pids` in `TaskTemplate.Resources.Limits`
to limit the maximum number of PIDs.
* `GET /tasks` now returns `Pids` in `TaskTemplate.Resources.Limits` .
* `GET /tasks/{id}` now returns `Pids` in `TaskTemplate.Resources.Limits` .
2022-07-29 20:05:10 +00:00
* `POST /containers/create` now accepts a `platform` query parameter in the format
`os[/arch[/variant]]` .
When set, 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
do 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
2019-05-13 22:04:28 +00:00
* `POST /containers/create` on Linux now accepts the `HostConfig.CgroupnsMode` property.
Set the property to `host` to create the container in the daemon's cgroup namespace, or
`private` to create the container in its own private cgroup namespace. The per-daemon
default is `host` , and can be changed by using the`CgroupNamespaceMode` daemon configuration
parameter.
2019-06-21 13:38:35 +00:00
* `GET /info` now returns an `OSVersion` field, containing the operating system's
version. This change is not versioned, and affects all API versions if the daemon
has this patch.
2020-01-03 11:28:23 +00:00
* `GET /info` no longer returns the `SystemStatus` field if it does not have a
value set. This change is not versioned, and affects all API versions if the
daemon has this patch.
2019-05-16 22:43:48 +00:00
* `GET /services` now accepts query parameter `status` . When set `true` ,
2019-12-11 16:05:03 +00:00
services returned will include `ServiceStatus` , which provides Desired,
Running, and Completed task counts for the service.
* `GET /services` may now include `ReplicatedJob` or `GlobalJob` as the `Mode`
in a `ServiceSpec` .
* `GET /services/{id}` may now include `ReplicatedJob` or `GlobalJob` as the
`Mode` in a `ServiceSpec` .
* `POST /services/create` now accepts `ReplicatedJob or ` GlobalJob` as the `Mode`
in the `ServiceSpec.
* `POST /services/{id}/update` accepts updating the fields of the
`ReplicatedJob` object in the `ServiceSpec.Mode` . The service mode still
cannot be changed, however.
* `GET /services` now includes `JobStatus` on Services with mode
`ReplicatedJob` or `GlobalJob` .
* `GET /services/{id}` now includes `JobStatus` on Services with mode
`ReplicatedJob` or `GlobalJob` .
* `GET /tasks` now includes `JobIteration` on Tasks spawned from a job-mode
service.
* `GET /tasks/{id}` now includes `JobIteration` on the task if spawned from a
job-mode service.
2020-02-07 23:55:06 +00:00
* `GET /containers/{id}/stats` now accepts a query param (`one-shot`) which, when used with `stream=false` fetches a
single set of stats instead of waiting for two collection cycles to have 2 CPU stats over a 1 second period.
2020-07-24 08:20:56 +00:00
* The `KernelMemory` field in `HostConfig.Resources` is now deprecated.
* The `KernelMemory` field in `Info` is now deprecated.
2020-07-26 11:42:33 +00:00
* `GET /services` now returns `Ulimits` as part of `ContainerSpec` .
* `GET /services/{id}` now returns `Ulimits` as part of `ContainerSpec` .
* `POST /services/create` now accepts `Ulimits` as part of `ContainerSpec` .
* `POST /services/{id}/update` now accepts `Ulimits` as part of `ContainerSpec` .
2019-05-13 21:55:20 +00:00
2018-10-26 13:34:27 +00:00
## v1.40 API changes
[Docker Engine API v1.40 ](https://docs.docker.com/engine/api/v1.40/ ) documentation
Add HEAD support for /_ping endpoint
Monitoring systems and load balancers are usually configured to use HEAD
requests for health monitoring. The /_ping endpoint currently does not
support this type of request, which means that those systems have fallback
to GET requests.
This patch adds support for HEAD requests on the /_ping endpoint.
Although optional, this patch also returns `Content-Type` and `Content-Length`
headers in case of a HEAD request; Refering to RFC 7231, section 4.3.2:
The HEAD method is identical to GET except that the server MUST NOT
send a message body in the response (i.e., the response terminates at
the end of the header section). The server SHOULD send the same
header fields in response to a HEAD request as it would have sent if
the request had been a GET, except that the payload header fields
(Section 3.3) MAY be omitted. This method can be used for obtaining
metadata about the selected representation without transferring the
representation data and is often used for testing hypertext links for
validity, accessibility, and recent modification.
A payload within a HEAD request message has no defined semantics;
sending a payload body on a HEAD request might cause some existing
implementations to reject the request.
The response to a HEAD request is cacheable; a cache MAY use it to
satisfy subsequent HEAD requests unless otherwise indicated by the
Cache-Control header field (Section 5.2 of [RFC7234]). A HEAD
response might also have an effect on previously cached responses to
GET; see Section 4.3.5 of [RFC7234].
With this patch applied, either `GET` or `HEAD` requests work; the only
difference is that the body is empty in case of a `HEAD` request;
curl -i --unix-socket /var/run/docker.sock http://localhost/_ping
HTTP/1.1 200 OK
Api-Version: 1.40
Cache-Control: no-cache, no-store, must-revalidate
Docker-Experimental: false
Ostype: linux
Pragma: no-cache
Server: Docker/dev (linux)
Date: Mon, 14 Jan 2019 12:35:16 GMT
Content-Length: 2
Content-Type: text/plain; charset=utf-8
OK
curl --head -i --unix-socket /var/run/docker.sock http://localhost/_ping
HTTP/1.1 200 OK
Api-Version: 1.40
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Docker-Experimental: false
Ostype: linux
Pragma: no-cache
Server: Docker/dev (linux)
Date: Mon, 14 Jan 2019 12:34:15 GMT
The client is also updated to use `HEAD` by default, but fallback to `GET`
if the daemon does not support this method.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-14 17:08:49 +00:00
* The `/_ping` endpoint can now be accessed both using `GET` or `HEAD` requests.
when accessed using a `HEAD` request, all headers are returned, but the body
is empty (`Content-Length: 0`). This change is not versioned, and affects all
API versions if the daemon has this patch. Clients are recommended to try
using `HEAD` , but fallback to `GET` if the `HEAD` requests fails.
* `GET /_ping` and `HEAD /_ping` now set `Cache-Control` and `Pragma` headers to
prevent the result from being cached. This change is not versioned, and affects
all API versions if the daemon has this patch.
2018-10-26 13:39:36 +00:00
* `GET /services` now returns `Sysctls` as part of the `ContainerSpec` .
* `GET /services/{id}` now returns `Sysctls` as part of the `ContainerSpec` .
* `POST /services/create` now accepts `Sysctls` as part of the `ContainerSpec` .
* `POST /services/{id}/update` now accepts `Sysctls` as part of the `ContainerSpec` .
2019-02-01 14:33:27 +00:00
* `POST /services/create` now accepts `Config` as part of `ContainerSpec.Privileges.CredentialSpec` .
* `POST /services/{id}/update` now accepts `Config` as part of `ContainerSpec.Privileges.CredentialSpec` .
2019-02-07 20:27:08 +00:00
* `POST /services/create` now includes `Runtime` as an option in `ContainerSpec.Configs`
* `POST /services/{id}/update` now includes `Runtime` as an option in `ContainerSpec.Configs`
2018-10-26 13:39:36 +00:00
* `GET /tasks` now returns `Sysctls` as part of the `ContainerSpec` .
* `GET /tasks/{id}` now returns `Sysctls` as part of the `ContainerSpec` .
2019-02-28 16:39:57 +00:00
* `GET /networks` now supports a `dangling` filter type. When set to `true` (or
`1` ), the endpoint 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.
2018-10-26 13:51:23 +00:00
* `GET /nodes` now supports a filter type `node.label` filter to filter nodes based
on the node.label. The format of the label filter is `node.label=<key>` /`node.label=< key > =< value > `
to return those with the specified labels, or `node.label!=<key>` /`node.label!=< key > =< value > `
to return those without the specified labels.
2019-04-16 10:27:32 +00:00
* `POST /containers/create` now accepts a `fluentd-async` option in `HostConfig.LogConfig.Config`
when using the Fluentd logging driver. This option deprecates the `fluentd-async-connect`
option, which remains funtional, but will be removed in a future release. Users
are encouraged to use the `fluentd-async` option going forward. This change is
not versioned, and affects all API versions if the daemon has this patch.
2019-04-16 10:42:54 +00:00
* `POST /containers/create` now accepts a `fluentd-request-ack` option in
`HostConfig.LogConfig.Config` when using the Fluentd logging driver. If enabled,
the Fluentd logging driver sends the chunk option with a unique ID. The server
will respond with an acknowledgement. This option improves the reliability of
the message transmission. This change is not versioned, and affects all API
versions if the daemon has this patch.
2018-10-10 10:20:13 +00:00
* `POST /containers/create` , `GET /containers/{id}/json` , and `GET /containers/json` now supports
`BindOptions.NonRecursive` .
2018-11-20 21:44:40 +00:00
* `POST /swarm/init` now accepts a `DataPathPort` property to set data path port number.
* `GET /info` now returns information about `DataPathPort` that is currently used in swarm
2019-02-24 13:27:30 +00:00
* `GET /info` now returns `PidsLimit` boolean to indicate if the host kernel has
PID limit support enabled.
2019-06-03 20:50:47 +00:00
* `GET /info` now includes `name=rootless` in `SecurityOptions` when the daemon is running in
rootless mode. This change is not versioned, and affects all API versions if the daemon has
this patch.
* `GET /info` now returns `none` as `CgroupDriver` when the daemon is running in rootless mode.
This change is not versioned, and affects all API versions if the daemon has this patch.
2019-03-01 00:32:08 +00:00
* `POST /containers/create` now accepts `DeviceRequests` as part of `HostConfig` .
Can be used to set Nvidia GPUs.
2018-11-20 21:44:40 +00:00
* `GET /swarm` endpoint now returns DataPathPort info
2018-05-11 19:46:11 +00:00
* `POST /containers/create` now takes `KernelMemoryTCP` field to set hard limit for kernel TCP buffer memory.
2018-09-30 12:28:37 +00:00
* `GET /service` now returns `MaxReplicas` as part of the `Placement` .
* `GET /service/{id}` now returns `MaxReplicas` as part of the `Placement` .
* `POST /service/create` and `POST /services/(id or name)/update` now take the field `MaxReplicas`
as part of the service `Placement` , allowing to specify maximum replicas per node for the service.
daemon: use 'private' ipc mode by default
This changes the default ipc mode of daemon/engine to be private,
meaning the containers will not have their /dev/shm bind-mounted
from the host by default. The benefits of doing this are:
1. No leaked mounts. Eliminate a possibility to leak mounts into
other namespaces (and therefore unfortunate errors like "Unable to
remove filesystem for <ID>: remove /var/lib/docker/containers/<ID>/shm:
device or resource busy").
2. Working checkpoint/restore. Make `docker checkpoint`
not lose the contents of `/dev/shm`, but save it to
the dump, and be restored back upon `docker start --checkpoint`
(currently it is lost -- while CRIU handles tmpfs mounts,
the "shareable" mount is seen as external to container,
and thus rightfully ignored).
3. Better security. Currently any container is opened to share
its /dev/shm with any other container.
Obviously, this change will break the following usage scenario:
$ docker run -d --name donor busybox top
$ docker run --rm -it --ipc container:donor busybox sh
Error response from daemon: linux spec namespaces: can't join IPC
of container <ID>: non-shareable IPC (hint: use IpcMode:shareable
for the donor container)
The soution, as hinted by the (amended) error message, is to
explicitly enable donor sharing by using --ipc shareable:
$ docker run -d --name donor --ipc shareable busybox top
Compatibility notes:
1. This only applies to containers created _after_ this change.
Existing containers are not affected and will work fine
as their ipc mode is stored in HostConfig.
2. Old backward compatible behavior ("shareable" containers
by default) can be enabled by either using
`--default-ipc-mode shareable` daemon command line option,
or by adding a `"default-ipc-mode": "shareable"`
line in `/etc/docker/daemon.json` configuration file.
3. If an older client (API < 1.40) is used, a "shareable" container
is created. A test to check that is added.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-11-28 00:10:44 +00:00
* `POST /containers/create` on Linux now creates a container with `HostConfig.IpcMode=private`
by default, if IpcMode is not explicitly specified. The per-daemon default can be changed
back to `shareable` by using `DefaultIpcMode` daemon configuration parameter.
2019-02-24 13:27:30 +00:00
* `POST /containers/{id}/update` now accepts a `PidsLimit` field to tune a container's
PID limit. Set `0` or `-1` for unlimited. Leave `null` to not change the current value.
2019-03-17 16:54:52 +00:00
* `POST /build` now accepts `outputs` key for configuring build outputs when using BuildKit mode.
2018-10-26 13:34:27 +00:00
2018-07-16 14:07:47 +00:00
## V1.39 API changes
[Docker Engine API v1.39 ](https://docs.docker.com/engine/api/v1.39/ ) documentation
* `GET /info` now returns an empty string, instead of `<unknown>` for `KernelVersion`
and `OperatingSystem` if the daemon was unable to obtain this information.
2018-08-18 00:05:21 +00:00
* `GET /info` now returns information about the product license, if a license
has been applied to the daemon.
2018-07-19 11:45:32 +00:00
* `GET /info` now returns a `Warnings` field, containing warnings and informational
messages about missing features, or issues related to the daemon configuration.
2018-07-30 15:25:02 +00:00
* `POST /swarm/init` now accepts a `DefaultAddrPool` property to set global scope default address pool
* `POST /swarm/init` now accepts a `SubnetSize` property to set global scope networks by giving the
length of the subnet masks for every such network
2019-10-02 10:12:36 +00:00
* `POST /session` (added in [V1.31 ](#v131-api-changes ) is no longer experimental.
This endpoint can be used to run interactive long-running protocols between the
client and the daemon.
2018-07-16 14:07:47 +00:00
2018-05-22 21:37:33 +00:00
## V1.38 API changes
2018-05-24 00:39:28 +00:00
[Docker Engine API v1.38 ](https://docs.docker.com/engine/api/v1.38/ ) documentation
2018-05-22 21:37:33 +00:00
* `GET /tasks` and `GET /tasks/{id}` now return a `NetworkAttachmentSpec` field,
containing the `ContainerID` for non-service containers connected to "attachable"
swarm-scoped networks.
2018-02-02 09:29:55 +00:00
## v1.37 API changes
2018-05-13 13:22:14 +00:00
[Docker Engine API v1.37 ](https://docs.docker.com/engine/api/v1.37/ ) documentation
2018-02-02 09:29:55 +00:00
* `POST /containers/create` and `POST /services/create` now supports exposing SCTP ports.
2018-02-21 12:50:48 +00:00
* `POST /configs/create` and `POST /configs/{id}/create` now accept a `Templating` driver.
* `GET /configs` and `GET /configs/{id}` now return the `Templating` driver of the config.
* `POST /secrets/create` and `POST /secrets/{id}/create` now accept a `Templating` driver.
* `GET /secrets` and `GET /secrets/{id}` now return the `Templating` driver of the secret.
2018-02-02 09:29:55 +00:00
2017-12-07 21:52:49 +00:00
## v1.36 API changes
[Docker Engine API v1.36 ](https://docs.docker.com/engine/api/v1.36/ ) documentation
2017-12-08 08:01:34 +00:00
* `Get /events` now return `exec_die` event when an exec process terminates.
2017-12-07 21:52:49 +00:00
2017-10-31 11:38:39 +00:00
## v1.35 API changes
2017-11-01 21:13:10 +00:00
[Docker Engine API v1.35 ](https://docs.docker.com/engine/api/v1.35/ ) documentation
* `POST /services/create` and `POST /services/(id)/update` now accepts an
`Isolation` field on container spec to set the Isolation technology of the
containers running the service (`default`, `process` , or `hyperv` ). This
configuration is only used for Windows containers.
2017-11-03 15:11:07 +00:00
* `GET /containers/(name)/logs` now supports an additional query parameter: `until` ,
which returns log lines that occurred before the specified timestamp.
2017-12-06 23:02:10 +00:00
* `POST /containers/{id}/exec` now accepts a `WorkingDir` property to set the
work-dir for the exec process, independent of the container's work-dir.
* `Get /version` now returns a `Platform.Name` field, which can be used by products
using Moby as a foundation to return information about the platform.
* `Get /version` now returns a `Components` field, which can be used to return
information about the components used. Information about the engine itself is
now included as a "Component" version, and contains all information from the
top-level `Version` , `GitCommit` , `APIVersion` , `MinAPIVersion` , `GoVersion` ,
`Os` , `Arch` , `BuildTime` , `KernelVersion` , and `Experimental` fields. Going
forward, the information from the `Components` section is preferred over their
top-level counterparts.
2017-10-31 11:38:39 +00:00
2017-09-29 23:08:56 +00:00
## v1.34 API changes
[Docker Engine API v1.34 ](https://docs.docker.com/engine/api/v1.34/ ) documentation
2017-09-20 13:19:16 +00:00
ContainerWait on remove: don't stuck on rm fail
Currently, if a container removal has failed for some reason,
any client waiting for removal (e.g. `docker run --rm`) is
stuck, waiting for removal to succeed while it has failed already.
For more details and the reproducer, please check
https://github.com/moby/moby/issues/34945
This commit addresses that by allowing `ContainerWait()` with
`container.WaitCondition == "removed"` argument to return an
error in case of removal failure. The `ContainerWaitOKBody`
stucture returned to a client is amended with a pointer to `struct Error`,
containing an error message string, and the `Client.ContainerWait()`
is modified to return the error, if any, to the client.
Note that this feature is only available for API version >= 1.34.
In order for the old clients to be unstuck, we just close the connection
without writing anything -- this causes client's error.
Now, docker-cli would need a separate commit to bump the API to 1.34
and to show an error returned, if any.
[v2: recreate the waitRemove channel after closing]
[v3: document; keep legacy behavior for older clients]
[v4: convert Error from string to pointer to a struct]
[v5: don't emulate old behavior, send empty response in error case]
[v6: rename legacy* vars to include version suffix]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-09-27 18:49:22 +00:00
* `POST /containers/(name)/wait?condition=removed` now also also returns
in case of container removal failure. A pointer to a structure named
`Error` added to the response JSON in order to indicate a failure.
If `Error` is `null` , container removal has succeeded, otherwise
the test of an error message indicating why container removal has failed
is available from `Error.Message` field.
2017-09-20 13:19:16 +00:00
## v1.33 API changes
[Docker Engine API v1.33 ](https://docs.docker.com/engine/api/v1.33/ ) documentation
2017-09-23 04:08:38 +00:00
* `GET /events` now supports filtering 4 more kinds of events: `config` , `node` ,
ContainerWait on remove: don't stuck on rm fail
Currently, if a container removal has failed for some reason,
any client waiting for removal (e.g. `docker run --rm`) is
stuck, waiting for removal to succeed while it has failed already.
For more details and the reproducer, please check
https://github.com/moby/moby/issues/34945
This commit addresses that by allowing `ContainerWait()` with
`container.WaitCondition == "removed"` argument to return an
error in case of removal failure. The `ContainerWaitOKBody`
stucture returned to a client is amended with a pointer to `struct Error`,
containing an error message string, and the `Client.ContainerWait()`
is modified to return the error, if any, to the client.
Note that this feature is only available for API version >= 1.34.
In order for the old clients to be unstuck, we just close the connection
without writing anything -- this causes client's error.
Now, docker-cli would need a separate commit to bump the API to 1.34
and to show an error returned, if any.
[v2: recreate the waitRemove channel after closing]
[v3: document; keep legacy behavior for older clients]
[v4: convert Error from string to pointer to a struct]
[v5: don't emulate old behavior, send empty response in error case]
[v6: rename legacy* vars to include version suffix]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-09-27 18:49:22 +00:00
`secret` and `service` .
2017-09-20 13:19:16 +00:00
2017-07-27 16:50:31 +00:00
## v1.32 API changes
[Docker Engine API v1.32 ](https://docs.docker.com/engine/api/v1.32/ ) documentation
2020-06-03 01:12:44 +00:00
* `POST /images/create` now accepts a `platform` parameter in the form of `os[/arch[/variant]]` .
Implement none, private, and shareable ipc modes
Since the commit d88fe447df0e8 ("Add support for sharing /dev/shm/ and
/dev/mqueue between containers") container's /dev/shm is mounted on the
host first, then bind-mounted inside the container. This is done that
way in order to be able to share this container's IPC namespace
(and the /dev/shm mount point) with another container.
Unfortunately, this functionality breaks container checkpoint/restore
(even if IPC is not shared). Since /dev/shm is an external mount, its
contents is not saved by `criu checkpoint`, and so upon restore any
application that tries to access data under /dev/shm is severily
disappointed (which usually results in a fatal crash).
This commit solves the issue by introducing new IPC modes for containers
(in addition to 'host' and 'container:ID'). The new modes are:
- 'shareable': enables sharing this container's IPC with others
(this used to be the implicit default);
- 'private': disables sharing this container's IPC.
In 'private' mode, container's /dev/shm is truly mounted inside the
container, without any bind-mounting from the host, which solves the
issue.
While at it, let's also implement 'none' mode. The motivation, as
eloquently put by Justin Cormack, is:
> I wondered a while back about having a none shm mode, as currently it is
> not possible to have a totally unwriteable container as there is always
> a /dev/shm writeable mount. It is a bit of a niche case (and clearly
> should never be allowed to be daemon default) but it would be trivial to
> add now so maybe we should...
...so here's yet yet another mode:
- 'none': no /dev/shm mount inside the container (though it still
has its own private IPC namespace).
Now, to ultimately solve the abovementioned checkpoint/restore issue, we'd
need to make 'private' the default mode, but unfortunately it breaks the
backward compatibility. So, let's make the default container IPC mode
per-daemon configurable (with the built-in default set to 'shareable'
for now). The default can be changed either via a daemon CLI option
(--default-shm-mode) or a daemon.json configuration file parameter
of the same name.
Note one can only set either 'shareable' or 'private' IPC modes as a
daemon default (i.e. in this context 'host', 'container', or 'none'
do not make much sense).
Some other changes this patch introduces are:
1. A mount for /dev/shm is added to default OCI Linux spec.
2. IpcMode.Valid() is simplified to remove duplicated code that parsed
'container:ID' form. Note the old version used to check that ID does
not contain a semicolon -- this is no longer the case (tests are
modified accordingly). The motivation is we should either do a
proper check for container ID validity, or don't check it at all
(since it is checked in other places anyway). I chose the latter.
3. IpcMode.Container() is modified to not return container ID if the
mode value does not start with "container:", unifying the check to
be the same as in IpcMode.IsContainer().
3. IPC mode unit tests (runconfig/hostconfig_test.go) are modified
to add checks for newly added values.
[v2: addressed review at https://github.com/moby/moby/pull/34087#pullrequestreview-51345997]
[v3: addressed review at https://github.com/moby/moby/pull/34087#pullrequestreview-53902833]
[v4: addressed the case of upgrading from older daemon, in this case
container.HostConfig.IpcMode is unset and this is valid]
[v5: document old and new IpcMode values in api/swagger.yaml]
[v6: add the 'none' mode, changelog entry to docs/api/version-history.md]
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-06-27 21:58:50 +00:00
* `POST /containers/create` now accepts additional values for the
`HostConfig.IpcMode` property. New values are `private` , `shareable` ,
and `none` .
2017-08-14 20:23:57 +00:00
* `DELETE /networks/{id or name}` fixed issue where a `name` equal to another
network's name was able to mask that `id` . If both a network with the given
_name_ exists, and a network with the given _id_ , the network with the given
_id_ is now deleted. This change is not versioned, and affects all API versions
if the daemon has this patch.
2017-07-27 16:50:31 +00:00
2017-06-09 12:39:55 +00:00
## v1.31 API changes
[Docker Engine API v1.31 ](https://docs.docker.com/engine/api/v1.31/ ) documentation
* `DELETE /secrets/(name)` now returns status code 404 instead of 500 when the secret does not exist.
* `POST /secrets/create` now returns status code 409 instead of 500 when creating an already existing secret.
2017-07-19 10:27:24 +00:00
* `POST /secrets/create` now accepts a `Driver` struct, allowing the
`Name` and driver-specific `Options` to be passed to store a secrets
in an external secrets store. The `Driver` property can be omitted
if the default (internal) secrets store is used.
* `GET /secrets/(id)` and `GET /secrets` now return a `Driver` struct,
containing the `Name` and driver-specific `Options` of the external
secrets store used to store the secret. The `Driver` property is
omitted if no external store is used.
2017-06-09 12:39:55 +00:00
* `POST /secrets/(name)/update` now returns status code 400 instead of 500 when updating a secret's content which is not the labels.
* `POST /nodes/(name)/update` now returns status code 400 instead of 500 when demoting last node fails.
2017-06-11 18:04:35 +00:00
* `GET /networks/(id or name)` now takes an optional query parameter `scope` that will filter the network based on the scope (`local`, `swarm` , or `global` ).
2017-06-22 22:36:56 +00:00
* `POST /session` is a new endpoint that can be used for running interactive long-running protocols between client and
the daemon. This endpoint is experimental and only available if the daemon is started with experimental features
enabled.
2017-03-02 20:47:02 +00:00
* `GET /images/(name)/get` now includes an `ImageMetadata` field which contains image metadata that is local to the engine and not part of the image config.
2017-06-07 17:07:01 +00:00
* `POST /services/create` now accepts a `PluginSpec` when `TaskTemplate.Runtime` is set to `plugin`
2017-07-11 09:22:46 +00:00
* `GET /events` now supports config events `create` , `update` and `remove` that are emitted when users create, update or remove a config
2017-07-19 13:30:18 +00:00
* `GET /volumes/` and `GET /volumes/{name}` now return a `CreatedAt` field,
containing the date/time the volume was created. This field is omitted if the
creation date/time for the volume is unknown. For volumes with scope "global",
this field represents the creation date/time of the local _instance_ of the
volume, which may differ from instances of the same volume on different nodes.
* `GET /system/df` now returns a `CreatedAt` field for `Volumes` . Refer to the
`/volumes/` endpoint for a description of this field.
2017-06-09 12:39:55 +00:00
2017-04-11 18:21:55 +00:00
## v1.30 API changes
[Docker Engine API v1.30 ](https://docs.docker.com/engine/api/v1.30/ ) documentation
2017-05-01 16:05:57 +00:00
* `GET /info` now returns the list of supported logging drivers, including plugins.
2017-04-27 02:46:20 +00:00
* `GET /info` and `GET /swarm` now returns the cluster-wide swarm CA info if the node is in a swarm: the cluster root CA certificate, and the cluster TLS
2017-05-02 21:58:57 +00:00
leaf certificate issuer's subject and public key. It also displays the desired CA signing certificate, if any was provided as part of the spec.
2017-04-06 12:33:56 +00:00
* `POST /build/` now (when not silent) produces an `Aux` message in the JSON output stream with payload `types.BuildResult` for each image produced. The final such message will reference the image resulting from the build.
2017-04-27 02:46:20 +00:00
* `GET /nodes` and `GET /nodes/{id}` now returns additional information about swarm TLS info if the node is part of a swarm: the trusted root CA, and the
issuer's subject and public key.
2017-05-10 20:33:25 +00:00
* `GET /distribution/(name)/json` is a new endpoint that returns a JSON output stream with payload `types.DistributionInspect` for an image name. It includes a descriptor with the digest, and supported platforms retrieved from directly contacting the registry.
2017-05-02 21:58:57 +00:00
* `POST /swarm/update` now accepts 3 additional parameters as part of the swarm spec's CA configuration; the desired CA certificate for
the swarm, the desired CA key for the swarm (if not using an external certificate), and an optional parameter to force swarm to
generate and rotate to a new CA certificate/key pair.
2017-05-10 18:47:29 +00:00
* `POST /service/create` and `POST /services/(id or name)/update` now take the field `Platforms` as part of the service `Placement` , allowing to specify platforms supported by the service.
2017-03-31 03:01:41 +00:00
* `POST /containers/(name)/wait` now accepts a `condition` query parameter to indicate which state change condition to wait for. Also, response headers are now returned immediately to acknowledge that the server has registered a wait callback for the client.
2017-07-11 04:15:02 +00:00
* `POST /swarm/init` now accepts a `DataPathAddr` property to set the IP-address or network interface to use for data traffic
* `POST /swarm/join` now accepts a `DataPathAddr` property to set the IP-address or network interface to use for data traffic
2017-04-28 11:53:00 +00:00
* `GET /events` now supports service, node and secret events which are emitted when users create, update and remove service, node and secret
2017-08-22 08:47:08 +00:00
* `GET /events` now supports network remove event which is emitted when users remove a swarm scoped network
2017-07-12 01:22:07 +00:00
* `GET /events` now supports a filter type `scope` in which supported value could be swarm and local
2019-05-29 08:33:56 +00:00
* `PUT /containers/(name)/archive` now accepts a `copyUIDGID` parameter to allow copy UID/GID maps to dest file or dir.
2017-05-01 16:05:57 +00:00
2017-03-03 18:45:48 +00:00
## v1.29 API changes
[Docker Engine API v1.29 ](https://docs.docker.com/engine/api/v1.29/ ) documentation
2017-03-09 19:52:25 +00:00
* `DELETE /networks/(name)` now allows to remove the ingress network, the one used to provide the routing-mesh.
* `POST /networks/create` now supports creating the ingress network, by specifying an `Ingress` boolean field. As of now this is supported only when using the overlay network driver.
* `GET /networks/(name)` now returns an `Ingress` field showing whether the network is the ingress one.
2017-03-03 18:45:48 +00:00
* `GET /networks/` now supports a `scope` filter to filter networks based on the network mode (`swarm`, `global` , or `local` ).
2017-04-11 13:39:01 +00:00
* `POST /containers/create` , `POST /service/create` and `POST /services/(id or name)/update` now takes the field `StartPeriod` as a part of the `HealthConfig` allowing for specification of a period during which the container should not be considered unhealthy even if health checks do not pass.
2017-05-10 18:47:29 +00:00
* `GET /services/(id)` now accepts an `insertDefaults` query-parameter to merge default values into the service inspect output.
2017-04-10 18:08:40 +00:00
* `POST /containers/prune` , `POST /images/prune` , `POST /volumes/prune` , and `POST /networks/prune` now support a `label` filter to filter containers, images, volumes, or networks based on the label. The format of the label filter could be `label=<key>` /`label=< key > =< value > ` to remove those with the specified labels, or `label!=<key>` /`label!=< key > =< value > ` to remove those without the specified labels.
2017-07-07 01:59:29 +00:00
* `POST /services/create` now accepts `Privileges` as part of `ContainerSpec` . Privileges currently include
`CredentialSpec` and `SELinuxContext` .
2017-03-03 18:45:48 +00:00
2017-03-14 01:31:48 +00:00
## v1.28 API changes
[Docker Engine API v1.28 ](https://docs.docker.com/engine/api/v1.28/ ) documentation
2016-11-11 19:51:26 +00:00
2017-03-10 15:02:32 +00:00
* `POST /containers/create` now includes a `Consistency` field to specify the consistency level for each `Mount` , with possible values `default` , `consistent` , `cached` , or `delegated` .
2017-03-13 17:47:52 +00:00
* `GET /containers/create` now takes a `DeviceCgroupRules` field in `HostConfig` allowing to set custom device cgroup rules for the created container.
2017-03-09 19:42:10 +00:00
* Optional query parameter `verbose` for `GET /networks/(id or name)` will now list all services with all the tasks, including the non-local tasks on the given network.
2017-03-14 01:31:48 +00:00
* `GET /containers/(id or name)/attach/ws` now returns WebSocket in binary frame format for API version >= v1.28, and returns WebSocket in text frame format for API version< v1.28 , for the purpose of backward-compatibility .
2019-09-26 17:26:09 +00:00
* `GET /networks` is optimised only to return list of all networks and network specific information. List of all containers attached to a specific network is removed from this API and is only available using the network specific `GET /networks/{network-id}` .
2017-02-02 03:05:54 +00:00
* `GET /containers/json` now supports `publish` and `expose` filters to filter containers that expose or publish certain ports.
2017-02-18 03:17:49 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `ReadOnly` parameter, which mounts the container's root filesystem as read only.
2017-01-13 15:01:58 +00:00
* `POST /build` now accepts `extrahosts` parameter to specify a host to ip mapping to use during the build.
2017-02-15 22:53:58 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now accept a `rollback` value for `FailureAction` .
2017-02-16 00:04:30 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now accept an optional `RollbackConfig` object which specifies rollback options.
2017-03-03 22:08:49 +00:00
* `GET /services` now supports a `mode` filter to filter services based on the service mode (either `global` or `replicated` ).
2021-02-10 12:02:27 +00:00
* `POST /containers/(name)/update` now supports updating `NanoCpus` that represents CPU quota in units of 10< sup > -9</ sup > CPUs.
2017-03-14 01:31:48 +00:00
## v1.27 API changes
[Docker Engine API v1.27 ](https://docs.docker.com/engine/api/v1.27/ ) documentation
2017-03-06 17:29:09 +00:00
* `GET /containers/(id or name)/stats` now includes an `online_cpus` field in both `precpu_stats` and `cpu_stats` . If this field is `nil` then for compatibility with older daemons the length of the corresponding `cpu_usage.percpu_usage` array should be used.
2017-01-26 03:07:27 +00:00
2017-02-09 00:13:02 +00:00
## v1.26 API changes
[Docker Engine API v1.26 ](https://docs.docker.com/engine/api/v1.26/ ) documentation
* `POST /plugins/(plugin name)/upgrade` upgrade a plugin.
2016-11-21 15:30:57 +00:00
## v1.25 API changes
2016-07-28 00:11:34 +00:00
2017-02-09 00:13:02 +00:00
[Docker Engine API v1.25 ](https://docs.docker.com/engine/api/v1.25/ ) documentation
2016-07-28 00:11:34 +00:00
2016-10-27 16:59:59 +00:00
* The API version is now required in all API calls. Instead of just requesting, for example, the URL `/containers/json` , you must now request `/v1.25/containers/json` .
2016-11-02 17:04:39 +00:00
* `GET /version` now returns `MinAPIVersion` .
2016-03-06 12:29:23 +00:00
* `POST /build` accepts `networkmode` parameter to specify network used during build.
2016-09-28 22:02:28 +00:00
* `GET /images/(name)/json` now returns `OsVersion` if populated
2022-02-28 18:30:00 +00:00
* `GET /images/(name)/json` no longer contains the `RootFS.BaseLayer` field. This
field was used for Windows images that used a base-image that was pre-installed
on the host (`RootFS.Type` `layers+base` ), which is no longer supported, and
the `RootFS.BaseLayer` field has been removed.
2016-09-07 22:10:00 +00:00
* `GET /info` now returns `Isolation` .
2016-08-08 16:47:12 +00:00
* `POST /containers/create` now takes `AutoRemove` in HostConfig, to enable auto-removal of the container on daemon side when the container's process exits.
2016-08-15 11:33:56 +00:00
* `GET /containers/json` and `GET /containers/(id or name)/json` now return `"removing"` as a value for the `State.Status` field if the container is being removed. Previously, "exited" was returned as status.
* `GET /containers/json` now accepts `removing` as a valid value for the `status` filter.
2016-11-10 00:59:01 +00:00
* `GET /containers/json` now supports filtering containers by `health` status.
2016-06-10 14:40:09 +00:00
* `DELETE /volumes/(name)` now accepts a `force` query parameter to force removal of volumes that were already removed out of band by the volume driver plugin.
2016-08-25 15:03:18 +00:00
* `POST /containers/create/` and `POST /containers/(name)/update` now validates restart policies.
2016-08-25 17:06:05 +00:00
* `POST /containers/create` now validates IPAMConfig in NetworkingConfig, and returns error for invalid IPv4 and IPv6 addresses (`--ip` and `--ip6` in `docker create/run` ).
2016-09-22 20:14:15 +00:00
* `POST /containers/create` now takes a `Mounts` field in `HostConfig` which replaces `Binds` , `Volumes` , and `Tmpfs` . *note* : `Binds` , `Volumes` , and `Tmpfs` are still available and can be combined with `Mounts` .
2016-09-22 00:42:53 +00:00
* `POST /build` now performs a preliminary validation of the `Dockerfile` before starting the build, and returns an error if the syntax is incorrect. Note that this change is _unversioned_ and applied to all API versions.
2016-09-22 21:38:00 +00:00
* `POST /build` accepts `cachefrom` parameter to specify images used for build cache.
2016-07-14 13:07:00 +00:00
* `GET /networks/` endpoint now correctly returns a list of *all* networks,
instead of the default network if a trailing slash is provided, but no `name`
or `id` .
2016-08-27 13:39:34 +00:00
* `DELETE /containers/(name)` endpoint now returns an error of `removal of container name is already in progress` with status code of 400, when container name is in a state of removal in progress.
2016-09-28 10:45:30 +00:00
* `GET /containers/json` now supports a `is-task` filter to filter
containers that are tasks (part of a service in swarm mode).
2016-05-26 20:34:48 +00:00
* `POST /containers/create` now takes `StopTimeout` field.
2016-09-02 21:12:05 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now accept `Monitor` and `MaxFailureRatio` parameters, which control the response to failures during service updates.
2016-10-20 19:04:01 +00:00
* `POST /services/(id or name)/update` now accepts a `ForceUpdate` parameter inside the `TaskTemplate` , which causes the service to be updated even if there are no changes which would ordinarily trigger an update.
2016-11-15 02:08:24 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now return a `Warnings` array.
2016-10-20 01:10:35 +00:00
* `GET /networks/(name)` now returns field `Created` in response to show network created time.
2016-07-13 17:24:41 +00:00
* `POST /containers/(id or name)/exec` now accepts an `Env` field, which holds a list of environment variables to be set in the context of the command execution.
2016-09-17 19:32:31 +00:00
* `GET /volumes` , `GET /volumes/(name)` , and `POST /volumes/create` now return the `Options` field which holds the driver specific options to use for when creating the volume.
2016-10-17 17:49:36 +00:00
* `GET /exec/(id)/json` now returns `Pid` , which is the system pid for the exec'd process.
2016-10-19 06:44:02 +00:00
* `POST /containers/prune` prunes stopped containers.
* `POST /images/prune` prunes unused images.
* `POST /volumes/prune` prunes unused volumes.
2016-10-18 04:36:52 +00:00
* `POST /networks/prune` prunes unused networks.
2016-10-06 14:09:54 +00:00
* Every API response now includes a `Docker-Experimental` header specifying if experimental features are enabled (value can be `true` or `false` ).
2016-11-03 00:43:32 +00:00
* Every API response now includes a `API-Version` header specifying the default API version of the server.
2016-06-07 19:05:43 +00:00
* The `hostConfig` option now accepts the fields `CpuRealtimePeriod` and `CpuRtRuntime` to allocate cpu runtime to rt tasks when `CONFIG_RT_GROUP_SCHED` is enabled in the kernel.
2016-10-27 22:35:51 +00:00
* The `SecurityOptions` field within the `GET /info` response now includes `userns` if user namespaces are enabled in the daemon.
2016-10-24 23:11:25 +00:00
* `GET /nodes` and `GET /node/(id or name)` now return `Addr` as part of a node's `Status` , which is the address that that node connects to the manager from.
2021-02-10 12:02:27 +00:00
* The `HostConfig` field now includes `NanoCpus` that represents CPU quota in units of 10< sup > -9</ sup > CPUs.
2016-11-04 16:20:55 +00:00
* `GET /info` now returns more structured information about security options.
2016-11-01 20:02:46 +00:00
* The `HostConfig` field now includes `CpuCount` that represents the number of CPUs available for execution by the container. Windows daemon only.
2016-11-04 18:31:44 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `TTY` parameter, which allocate a pseudo-TTY in container.
2016-10-27 03:05:39 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now accept the `DNSConfig` parameter, which specifies DNS related configurations in resolver configuration file (resolv.conf) through `Nameservers` , `Search` , and `Options` .
2020-02-10 11:07:07 +00:00
* `POST /services/create` and `POST /services/(id or name)/update` now support
`node.platform.arch` and `node.platform.os` constraints in the services
`TaskSpec.Placement.Constraints` field.
2016-11-04 19:27:36 +00:00
* `GET /networks/(id or name)` now includes IP and name of all peers nodes for swarm mode overlay networks.
2016-11-10 01:49:09 +00:00
* `GET /plugins` list plugins.
* `POST /plugins/pull?name=<plugin name>` pulls a plugin.
* `GET /plugins/(plugin name)` inspect a plugin.
* `POST /plugins/(plugin name)/set` configure a plugin.
* `POST /plugins/(plugin name)/enable` enable a plugin.
* `POST /plugins/(plugin name)/disable` disable a plugin.
2016-11-10 19:55:39 +00:00
* `POST /plugins/(plugin name)/push` push a plugin.
2016-11-10 01:49:09 +00:00
* `POST /plugins/create?name=(plugin name)` create a plugin.
* `DELETE /plugins/(plugin name)` delete a plugin.
2016-10-21 10:16:47 +00:00
* `POST /node/(id or name)/update` now accepts both `id` or `name` to identify the node to update.
2016-11-17 14:34:17 +00:00
* `GET /images/json` now support a `reference` filter.
2016-11-29 05:37:16 +00:00
* `GET /secrets` returns information on the secrets.
* `POST /secrets/create` creates a secret.
* `DELETE /secrets/{id}` removes the secret `id` .
* `GET /secrets/{id}` returns information on the secret `id` .
* `POST /secrets/{id}/update` updates the secret `id` .
2016-12-20 17:14:02 +00:00
* `POST /services/(id or name)/update` now accepts service name or prefix of service id as a parameter.
2016-11-23 02:55:27 +00:00
* `POST /containers/create` added 2 built-in log-opts that work on all logging drivers,
2018-01-25 18:43:24 +00:00
`mode` (`blocking`|`non-blocking`), and `max-buffer-size` (e.g. `2m` ) which enables a non-blocking log buffer.
* `POST /containers/create` now takes `HostConfig.Init` field to run an init
inside the container that forwards signals and reaps processes.
2016-10-18 04:36:52 +00:00
2016-11-21 15:30:57 +00:00
## v1.24 API changes
2016-03-23 16:26:23 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.24 ](v1.24.md ) documentation
2016-03-23 16:26:23 +00:00
2016-03-20 04:42:58 +00:00
* `POST /containers/create` now takes `StorageOpt` field.
2016-03-29 04:10:37 +00:00
* `GET /info` now returns `SecurityOptions` field, showing if `apparmor` , `seccomp` , or `selinux` is supported.
2016-07-12 22:45:23 +00:00
* `GET /info` no longer returns the `ExecutionDriver` property. This property was no longer used after integration
with ContainerD in Docker 1.11.
2016-04-25 20:21:11 +00:00
* `GET /networks` now supports filtering by `label` and `driver` .
2016-06-06 00:04:33 +00:00
* `GET /containers/json` now supports filtering containers by `network` name or id.
2016-09-20 11:51:55 +00:00
* `POST /containers/create` now takes `IOMaximumBandwidth` and `IOMaximumIOps` fields. Windows daemon only.
2016-05-08 01:36:10 +00:00
* `POST /containers/create` now returns an HTTP 400 "bad parameter" message
if no command is specified (instead of an HTTP 500 "server error")
2016-05-20 11:41:28 +00:00
* `GET /images/search` now takes a `filters` query parameter.
2016-05-08 23:15:33 +00:00
* `GET /events` now supports a `reload` event that is emitted when the daemon configuration is reloaded.
* `GET /events` now supports filtering by daemon name or ID.
2016-06-03 17:11:52 +00:00
* `GET /events` now supports a `detach` event that is emitted on detaching from container process.
* `GET /events` now supports an `exec_detach ` event that is emitted on detaching from exec process.
2016-05-25 11:49:10 +00:00
* `GET /images/json` now supports filters `since` and `before` .
2016-05-07 10:05:26 +00:00
* `POST /containers/(id or name)/start` no longer accepts a `HostConfig` .
2016-06-01 15:22:59 +00:00
* `POST /images/(name)/tag` no longer has a `force` query parameter.
2016-06-01 20:38:14 +00:00
* `GET /images/search` now supports maximum returned search results `limit` .
2016-06-03 17:38:03 +00:00
* `POST /containers/{name:.*}/copy` is now removed and errors out starting from this API version.
2016-05-21 11:56:04 +00:00
* API errors are now returned as JSON instead of plain text.
2016-06-14 22:14:16 +00:00
* `POST /containers/create` and `POST /containers/(id)/start` allow you to configure kernel parameters (sysctls) for use in the container.
2016-07-06 07:13:59 +00:00
* `POST /containers/<container ID>/exec` and `POST /exec/<exec ID>/start`
2016-06-29 20:30:09 +00:00
no longer expects a "Container" field to be present. This property was not used
and is no longer sent by the docker client.
2016-07-06 07:13:59 +00:00
* `POST /containers/create/` now validates the hostname (should be a valid RFC 1123 hostname).
2016-07-11 23:52:42 +00:00
* `POST /containers/create/` `HostConfig.PidMode` field now accepts `container:<name|id>` ,
to have the container join the PID namespace of an existing container.
2016-03-20 04:42:58 +00:00
2016-11-21 15:30:57 +00:00
## v1.23 API changes
2016-01-15 15:38:33 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.23 ](v1.23.md ) documentation
2016-01-15 15:38:33 +00:00
2015-12-29 14:35:37 +00:00
* `GET /containers/json` returns the state of the container, one of `created` , `restarting` , `running` , `paused` , `exited` or `dead` .
2016-02-03 22:46:01 +00:00
* `GET /containers/json` returns the mount points for the container.
2016-01-15 07:31:12 +00:00
* `GET /networks/(name)` now returns an `Internal` field showing whether the network is internal or not.
2016-02-23 16:08:09 +00:00
* `GET /networks/(name)` now returns an `EnableIPv6` field showing whether the network has ipv6 enabled or not.
2016-01-04 15:58:20 +00:00
* `POST /containers/(name)/update` now supports updating container's restart policy.
2016-02-23 16:08:09 +00:00
* `POST /networks/create` now supports enabling ipv6 on the network by setting the `EnableIPv6` field (doing this with a label will no longer work).
2016-02-18 10:10:31 +00:00
* `GET /info` now returns `CgroupDriver` field showing what cgroup driver the daemon is using; `cgroupfs` or `systemd` .
2016-03-02 13:35:17 +00:00
* `GET /info` now returns `KernelMemory` field, showing if "kernel memory limit" is supported.
2015-12-15 19:15:43 +00:00
* `POST /containers/create` now takes `PidsLimit` field, if the kernel is >= 4.3 and the pids cgroup is supported.
* `GET /containers/(id or name)/stats` now returns `pids_stats` , if the kernel is >= 4.3 and the pids cgroup is supported.
2016-02-08 14:23:24 +00:00
* `POST /containers/create` now allows you to override usernamespaces remapping and use privileged options for the container.
2016-03-15 03:31:42 +00:00
* `POST /containers/create` now allows specifying `nocopy` for named volumes, which disables automatic copying from the container path to the volume.
2016-03-04 21:31:40 +00:00
* `POST /auth` now returns an `IdentityToken` when supported by a registry.
2016-02-13 23:44:05 +00:00
* `POST /containers/create` with both `Hostname` and `Domainname` fields specified will result in the container's hostname being set to `Hostname` , rather than `Hostname.Domainname` .
2016-03-21 07:39:48 +00:00
* `GET /volumes` now supports more filters, new added filters are `name` and `driver` .
2016-04-08 16:15:08 +00:00
* `GET /containers/(id or name)/logs` now accepts a `details` query parameter to stream the extra attributes that were provided to the containers `LogOpts` , such as environment variables and labels, with the logs.
2016-08-09 10:03:35 +00:00
* `POST /images/load` now returns progress information as a JSON stream, and has a `quiet` query parameter to suppress progress details.
2016-01-15 15:38:33 +00:00
2016-11-21 15:30:57 +00:00
## v1.22 API changes
2015-10-14 00:12:50 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.22 ](v1.22.md ) documentation
2015-10-14 00:12:50 +00:00
2022-01-20 16:24:07 +00:00
* The `HostConfig.LxcConf` field has been removed, and is no longer available on
`POST /containers/create` and `GET /containers/(id)/json` .
2016-01-12 07:33:41 +00:00
* `POST /container/(name)/update` updates the resources of a container.
2015-10-19 16:33:43 +00:00
* `GET /containers/json` supports filter `isolation` on Windows.
Add containers’ networks to /containers/json
After addition of multi-host networking in Docker 1.9, Docker Remote
API is still returning only the network specified during creation
of the container in the “List Containers” (`/containers/json`) endpoint:
...
"HostConfig": {
"NetworkMode": "default"
},
The list of networks containers are attached to is only available at
Get Container (`/containers/<id>/json`) endpoint.
This does not allow applications utilizing multi-host networking to
be built on top of Docker Remote API.
Therefore I added a simple `"NetworkSettings"` section to the
`/containers/json` endpoint. This is not identical to the NetworkSettings
returned in Get Container (`/containers/<id>/json`) endpoint. It only
contains a single field `"Networks"`, which is essentially the same
value shown in inspect output of a container.
This change adds the following section to the `/containers/json`:
"NetworkSettings": {
"Networks": {
"bridge": {
"EndpointID": "2cdc4edb1ded3631c81f57966563e...",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02"
}
}
}
This is of type `SummaryNetworkSettings` type, a minimal version of
`api/types#NetworkSettings`.
Actually all I need is the network name and the IPAddress fields. If folks
find this addition too big, I can create a `SummaryEndpointSettings` field
as well, containing just the IPAddress field.
Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
2015-12-10 04:48:50 +00:00
* `GET /containers/json` now returns the list of networks of containers.
2015-11-25 13:10:18 +00:00
* `GET /info` Now returns `Architecture` and `OSType` fields, providing information
about the host architecture and operating system type that the daemon runs on.
2015-11-20 11:41:25 +00:00
* `GET /networks/(name)` now returns a `Name` field for each container attached to the network.
2015-12-13 16:00:39 +00:00
* `GET /version` now returns the `BuildTime` field in RFC3339Nano format to make it
2015-11-30 14:44:06 +00:00
consistent with other date/time values returned by the API.
2015-11-04 05:03:12 +00:00
* `AuthConfig` now supports a `registrytoken` for token based authentication
2015-12-09 06:26:41 +00:00
* `POST /containers/create` now has a 4M minimum value limit for `HostConfig.KernelMemory`
2015-12-13 16:00:39 +00:00
* Pushes initiated with `POST /images/(name)/push` and pulls initiated with `POST /images/create`
2015-12-09 19:26:07 +00:00
will be cancelled if the HTTP connection making the API request is closed before
the push or pull completes.
2016-01-24 04:36:40 +00:00
* `POST /containers/create` now allows you to set a read/write rate limit for a
2015-07-08 11:06:48 +00:00
device (in bytes per second or IO per second).
2015-11-10 08:57:06 +00:00
* `GET /networks` now supports filtering by `name` , `id` and `type` .
2016-01-08 00:18:34 +00:00
* `POST /containers/create` now allows you to set the static IPv4 and/or IPv6 address for the container.
* `POST /networks/(id)/connect` now allows you to set the static IPv4 and/or IPv6 address for the container.
2016-01-12 00:23:12 +00:00
* `GET /info` now includes the number of containers running, stopped, and paused.
2016-02-23 16:08:09 +00:00
* `POST /networks/create` now supports restricting external access to the network by setting the `Internal` field.
2016-01-13 04:56:36 +00:00
* `POST /networks/(id)/disconnect` now includes a `Force` option to forcefully disconnect a container from network
2016-01-14 05:46:59 +00:00
* `GET /containers/(id)/json` now returns the `NetworkID` of containers.
2016-01-24 04:36:40 +00:00
* `POST /networks/create` Now supports an options field in the IPAM config that provides options
2015-10-23 19:28:39 +00:00
for custom IPAM plugins.
* `GET /networks/{network-id}` Now returns IPAM config options for custom IPAM plugins if any
are available.
2015-12-28 04:56:57 +00:00
* `GET /networks/<network-id>` now returns subnets info for user-defined networks.
2016-01-24 21:30:21 +00:00
* `GET /info` can now return a `SystemStatus` field useful for returning additional information about applications
that are built on top of engine.
2015-10-14 00:12:50 +00:00
2016-11-21 15:30:57 +00:00
## v1.21 API changes
2015-05-28 02:24:59 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.21 ](v1.21.md ) documentation
2015-05-15 18:35:41 +00:00
2015-06-12 13:25:32 +00:00
* `GET /volumes` lists volumes from all volume drivers.
2015-10-17 11:49:14 +00:00
* `POST /volumes/create` to create a volume.
2015-06-12 13:25:32 +00:00
* `GET /volumes/(name)` get low-level information about a volume.
2016-01-12 07:33:41 +00:00
* `DELETE /volumes/(name)` remove a volume with the specified name.
2015-10-13 09:26:27 +00:00
* `VolumeDriver` was moved from `config` to `HostConfig` to make the configuration portable.
* `GET /images/(name)/json` now returns information about an image's `RepoTags` and `RepoDigests` .
2015-08-04 20:51:48 +00:00
* The `config` option now accepts the field `StopSignal` , which specifies the signal to use to kill a container.
2015-08-24 09:17:15 +00:00
* `GET /containers/(id)/stats` will return networking information respectively for each interface.
2015-10-13 09:26:27 +00:00
* The `HostConfig` option now includes the `DnsOptions` field to configure the container's DNS options.
2014-11-14 18:59:14 +00:00
* `POST /build` now optionally takes a serialized map of build-time variables.
2015-09-15 19:33:11 +00:00
* `GET /events` now includes a `timenano` field, in addition to the existing `time` field.
2015-09-30 17:12:41 +00:00
* `GET /events` now supports filtering by image and container labels.
2015-10-09 07:02:04 +00:00
* `GET /info` now lists engine version information and return the information of `CPUShares` and `Cpuset` .
2015-10-02 14:48:35 +00:00
* `GET /containers/json` will return `ImageID` of the image used by container.
2015-09-12 02:50:21 +00:00
* `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused.
2016-10-17 02:42:35 +00:00
* `POST /containers/create` now takes `KernelMemory` in HostConfig to specify kernel memory limit.
2015-09-25 12:49:02 +00:00
* `GET /containers/(name)/json` now accepts a `size` parameter. Setting this parameter to '1' returns container size information in the `SizeRw` and `SizeRootFs` fields.
2015-11-03 13:03:18 +00:00
* `GET /containers/(name)/json` now returns a `NetworkSettings.Networks` field,
detailing network settings per network. This field deprecates the
`NetworkSettings.Gateway` , `NetworkSettings.IPAddress` ,
`NetworkSettings.IPPrefixLen` , and `NetworkSettings.MacAddress` fields, which
are still returned for backward-compatibility, but will be removed in a future version.
* `GET /exec/(id)/json` now returns a `NetworkSettings.Networks` field,
detailing networksettings per network. This field deprecates the
`NetworkSettings.Gateway` , `NetworkSettings.IPAddress` ,
`NetworkSettings.IPPrefixLen` , and `NetworkSettings.MacAddress` fields, which
are still returned for backward-compatibility, but will be removed in a future version.
2015-10-13 09:26:27 +00:00
* The `HostConfig` option now includes the `OomScoreAdj` field for adjusting the
badness heuristic. This heuristic selects which processes the OOM killer kills
under out-of-memory conditions.
2015-05-15 18:35:41 +00:00
2016-11-21 15:30:57 +00:00
## v1.20 API changes
2015-05-15 18:35:41 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.20 ](v1.20.md ) documentation
2015-05-15 18:35:41 +00:00
2015-06-12 13:25:32 +00:00
* `GET /containers/(id)/archive` get an archive of filesystem content from a container.
* `PUT /containers/(id)/archive` upload an archive of content to be extracted to
an existing directory inside a container's filesystem.
* `POST /containers/(id)/copy` is deprecated in favor of the above `archive`
endpoint which can be used to download files and directories from a container.
* The `hostConfig` option now accepts the field `GroupAdd` , which specifies a
list of additional groups that the container process will run as.
2015-05-15 18:35:41 +00:00
2016-11-21 15:30:57 +00:00
## v1.19 API changes
2015-06-17 20:25:53 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.19 ](v1.19.md ) documentation
2015-04-01 20:35:38 +00:00
2015-06-12 13:25:32 +00:00
* When the daemon detects a version mismatch with the client, usually when
2015-05-19 16:28:50 +00:00
the client is newer than the daemon, an HTTP 400 is now returned instead
of a 404.
2015-06-12 13:25:32 +00:00
* `GET /containers/(id)/stats` now accepts `stream` bool to get only one set of stats and disconnect.
* `GET /containers/(id)/logs` now accepts a `since` timestamp parameter.
* `GET /info` The fields `Debug` , `IPv4Forwarding` , `MemoryLimit` , and
`SwapLimit` are now returned as boolean instead of as an int. In addition, the
end point now returns the new boolean fields `CpuCfsPeriod` , `CpuCfsQuota` , and
`OomKillDisable` .
2015-10-12 15:17:49 +00:00
* The `hostConfig` option now accepts the fields `CpuPeriod` and `CpuQuota`
* `POST /build` accepts `cpuperiod` and `cpuquota` options
2015-06-12 13:25:32 +00:00
2016-11-21 15:30:57 +00:00
## v1.18 API changes
2015-06-12 13:25:32 +00:00
2016-11-15 19:45:20 +00:00
[Docker Engine API v1.18 ](v1.18.md ) documentation
2015-06-12 13:25:32 +00:00
* `GET /version` now returns `Os` , `Arch` and `KernelVersion` .
* `POST /containers/create` and `POST /containers/(id)/start` allow you to set ulimit settings for use in the container.
* `GET /info` now returns `SystemTime` , `HttpProxy` ,`HttpsProxy` and `NoProxy` .
* `GET /images/json` added a `RepoDigests` field to include image digest information.
* `POST /build` can now set resource constraints for all containers created for the build.
* `CgroupParent` can be passed in the host config to setup container cgroups under a specific cgroup.
* `POST /build` closing the HTTP request cancels the build
* `POST /containers/(id)/exec` includes `Warnings` field to response.