Commit graph

305 commits

Author SHA1 Message Date
Brian Goff
4669418731
Volume prune: only prune anonymous volumes by default
This adds a new filter argument to the volume prune endpoint "all".
When this is not set, or it is a false-y value, then only anonymous
volumes are considered for pruning.

When `all` is set to a truth-y value, you get the old behavior.

This is an API change, but I think one that is what most people would
want.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 618f26ccbc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-05 23:50:01 +02:00
Sebastiaan van Stijn
edef49eeac
docs: swagger: update description for default builder version
Commit 7b153b9e28 updated the main
swagger file, but didn't update the v1.42 version used for the
documentation as it wasn't created yet at the time.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 271243d382)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-04 19:00:47 +02:00
CrazyMax
5dfec22079
swagger: update links to logo
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 7f3602f1c9)
2022-09-27 11:56:36 +02:00
Sebastiaan van Stijn
2c17e9a333 api: set default "Builder-Version" to "2" (BuildKit) on Linux
Starting with the 22.06 release, buildx is the default client for
docker build, which uses BuildKit as builder.

This patch changes the default builder version as advertised by
the daemon to "2" (BuildKit), so that pre-22.06 CLIs with BuildKit
support (but no buildx installed) also default to using BuildKit
when interacting with a 22.06 (or up) daemon.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-18 12:18:32 -06:00
Sebastiaan van Stijn
b73c27ef6b
vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a
full diff: 6068d1894d...48dd89375d

Finishes off the work to change references to cluster volumes in the API
from using "csi" as the magic word to "cluster". This reflects that the
volumes are "cluster volumes", not "csi volumes".

Notably, there is no change to the plugin definitions being "csinode"
and "csicontroller". This terminology is appropriate with regards to
plugins because it accurates reflects what the plugin is.

Signed-off-by: Drew Erny <derny@mirantis.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9861dd069b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-09 14:05:30 +02:00
Sebastiaan van Stijn
e6a5f44e61
Merge pull request #43914 from thaJeztah/22.06_backport_fix_api_swagger
[22.06 backport] api: swagger: fix invalid example value (API v1.39-v1.41)
2022-08-04 21:02:55 +02:00
Sebastiaan van Stijn
7130076488
Merge pull request #43890 from thaJeztah/22.06_backport_api_fix_missing_platform
[22.06 backport] api: swagger: add missing "platform" query-arg on create
2022-08-04 21:00:55 +02:00
Sebastiaan van Stijn
0133759476
api: swagger: fix invalid example value (API v1.39-v1.41)
This was introduced in 43956c1bfc

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 30295c1750)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-04 17:55:21 +02:00
Sebastiaan van Stijn
572457e265
api: swagger: document BuildCache fields (API v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 43956c1bfc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-04 09:33:39 +02:00
Sebastiaan van Stijn
49377cdd63
api: swagger: document BuildCache fields (API v1.42)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5371c889a8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-04 09:33:37 +02:00
Sebastiaan van Stijn
910d5c44fc
api: add BuildCache.Parents for API >= v1.42
This field was added to replace the deprecated "Parent" field.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e0db8207f3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-04 09:33:35 +02:00
Sebastiaan van Stijn
0e3d20cb20
api: deprecate BuildCache.Parent in API >= v1.42
This field has been deprecated in BuildKit, so this follows the deprecation
in the Engine API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ebf339628a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-04 09:33:33 +02:00
Sebastiaan van Stijn
e88c28941f
docs: api: add missing "platform" query-arg on create (v1.42)
Commit 7a9cb29fb9 added a new "platform" query-
parameter to the `POST /containers/create` endpoint, but did not update the
swagger file and documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 982f09f837)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-29 23:23:02 +02:00
Sebastiaan van Stijn
9c4984db6b
docs: api: add missing "platform" query-arg on create (v1.41)
Commit 7a9cb29fb9 added a new "platform" query-
parameter to the `POST /containers/create` endpoint, but did not update the
swagger file and documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1000e4ee7d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-29 23:23:00 +02:00
Sebastiaan van Stijn
af7c8ff045
api: swagger: add missing "platform" query-arg on create
Commit 7a9cb29fb9 added a new "platform" query-
parameter to the `POST /containers/create` endpoint, but did not update the
swagger file and documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3dae8e9fc2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-29 23:22:58 +02:00
Sebastiaan van Stijn
c51efa8617
docs: add API v1.42
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 264b41fb9e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 22:49:14 +02:00
Paweł Gronowski
56a20dbc19 container/exec: Support ConsoleSize
Now client have the possibility to set the console size of the executed
process immediately at the creation. This makes a difference for example
when executing commands that output some kind of text user interface
which is bounded by the console dimensions.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2022-06-24 11:54:25 +02:00
Niel Drummond
2359da802b docs: api: adjust ContainerWaitResponse error as optional
Signed-off-by: Niel Drummond <niel@drummond.lu>
2022-05-30 16:40:34 +01:00
Tobias Gesellchen
345346d7c6 Annotate some swagger documented types as int64
Using the swagger.yaml to generate api models will create incompatible field types. Some inconsistencies had already been mentioned at #39131. I've added more fixes from real life experience, some only occurring on Windows.

Closes #39131

Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
2022-05-23 21:10:07 +02:00
Nicolas De Loof
304fbf0804
introduce CreateMountpoint for parity between binds and mounts
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-05-19 16:43:06 +02:00
Paweł Gronowski
85a7f5a09a daemon/linux: Set console size on creation
On Linux the daemon was not respecting the HostConfig.ConsoleSize
property and relied on cli initializing the tty size after the container
was created. This caused a delay between container creation and
the tty actually being resized.

This is also a small change to the api description, because
HostConfig.ConsoleSize is no longer Windows-only.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2022-05-19 07:57:27 +02:00
Sebastiaan van Stijn
a5a77979dd
docs: api: /containers/{id}/attach/ws: remove unsupported query-args < v1.42
These query-args were documented, but not actually supported until
ea6760138c (API v1.42).

This removes them from the documentation, as these arguments were ignored
(and defaulted to `true` (enabled))

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-18 11:05:15 +02:00
Sebastiaan van Stijn
d4a0a422da
docs: api: add note about websocket attach streams
Slightly make the change in API v1.42 more visible, and add a snippet
about what users should do to preserve the pre-v1.41 behavior.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-18 11:03:09 +02:00
Sebastiaan van Stijn
4cac624fef
Merge pull request #43322 from ndeloof/websocket_streams
wsContainersAttach attach to stdin/out/err streams as requested
2022-05-18 10:50:39 +02:00
Nicolas De Loof
ea6760138c
wsContainersAttach attach to stdin/out/err streams as requested
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-05-17 13:23:07 +02:00
Djordje Lukic
cc3848f2b7
Rename Reservation to Reservations in the open API
The correct name for this property is, and always was "Reservations"

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2022-05-17 10:14:07 +02:00
Drew Erny
240a9fcb83
Add Swarm cluster volume supports
Adds code to support Cluster Volumes in Swarm using CSI drivers.

Signed-off-by: Drew Erny <derny@mirantis.com>
2022-05-13 00:55:44 +02:00
Nicolas De Loof
af5d83a641
Make it explicit raw|multiplexed stream implementation being used
fix #35761

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2022-05-12 11:36:31 +02:00
Sebastiaan van Stijn
54386f0c8f
api: docs: move VolumeListResponse to definitions (v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-21 19:49:56 +02:00
Sebastiaan van Stijn
1a0c15abbb
Merge pull request #43206 from thaJeztah/having_such_a_good_time_im_having_a_ball
API: add "signal" parameter to container stop and restart endpoints
2022-04-21 16:08:43 +02:00
Sebastiaan van Stijn
603c64fff0
Merge pull request #43461 from thaJeztah/api_document_ContainerConfig
api: improve documentation of ContainerConfig type
2022-04-20 21:50:19 +02:00
Sebastiaan van Stijn
83a185897d
API: add "signal" parameter to container stop and restart endpoints
Containers can have a default stop-signal (`--stop-signal` / `STOPSIGNAL`) and
timeout (`--stop-timeout`). It is currently not possible to update either of
these after the container is created (`docker update` does not allow updating
them), and while either of these can be overridden through some commands, we
currently do not have a command that can override *both*:

command         | stop-signal | stop-timeout | notes
----------------|-------------|--------------|----------------------------
docker kill     | yes         | DNA          | only sends a single signal
docker restart  | no          | yes          |
docker stop     | no          | yes          |

As a result, if a user wants to stop a container with a custom signal and
timeout, the only option is to do this manually:

    docker kill -s <custom signal> mycontainer
    # wait <desired timeout>
    # press ^C to cancel the graceful stop
    # forcibly kill the container
    docker kill mycontainer

This patch adds a new `signal` query parameter to the container "stop" and
"restart" endpoints. This parameter can be added as a new flag on the CLI,
which would allow stopping and restarting with a custom timeout and signal,
for example:

    docker stop --signal=SIGWINCH --time=120 mycontainer

    docker restart --signal=SIGWINCH --time=120 mycontainer

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-20 21:29:31 +02:00
Sebastiaan van Stijn
b9de761c26
docs: api: document ImageSummary fields (api v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-20 12:10:17 +02:00
Sebastiaan van Stijn
07dba5d9fe
api: docs: improve documentation of ContainerConfig type (API v1.30-v1.41)
ContainerConfig is used in multiple locations (for example, both for
Image.Config and Image.ContainerConfig). Unfortunately, swagger does
not allow documenting individual uses if a type is used; for this type,
the content is _optional_ when used as Image.ContainerConfig (which is
set by the classic builder, which does a "commit" of a container, but
not used when building an image with BuildKit).

This patch attempts to address this confusion by documenting that
"it may be empty (or fields not propagated) if it's used for the
Image.ContainerConfig field".

Perhaps alternatives are possible (aliasing the type?) but we can
look at those in a follow-up.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-19 16:22:29 +02:00
Paul "TBBle" Hampson
cb07afa3cc Implement :// separator for arbitrary Windows Device IDTypes
Arbitrary here does not include '', best to catch that one early as it's
almost certainly a mistake (possibly an attempt to pass a POSIX path
through this API)

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-27 13:26:47 +11:00
Sebastiaan van Stijn
adf4bf772d
API: add "Swarm" header to _ping endpoint
This adds an additional "Swarm" header to the _ping endpoint response,
which allows a client to detect if Swarm is enabled on the daemon, without
having to call additional endpoints.

This change is not versioned in the API, and will be returned irregardless
of the API version that is used. Clients should fall back to using other
endpoints to get this information if the header is not present.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-25 23:54:14 +01:00
Sebastiaan van Stijn
4a26fdda76
Merge pull request #43334 from thaJeztah/api_swagger_inline_examples
api: swagger: use explicit definitions, use inline examples, and fix indentation.
2022-03-25 09:51:13 +01:00
Sebastiaan van Stijn
b7a72435a6
Merge pull request #41060 from grooverdan/dock-api-fix-create-image
doc: server API Correct ImagesCreate - platform parameter added in 1.32
2022-03-18 19:02:30 +01:00
Sebastiaan van Stijn
86b6c9d640
Merge pull request #43381 from thaJeztah/docs_swagger_multi_example_fixes
docs: cleanup swagger API with multiple examples (v1.25-v1.41)
2022-03-17 18:40:47 +01:00
Sebastiaan van Stijn
427b0cd636
api/types: fix KernelMemory deprecation comment, and omitempty
This fixes the "deprecated" comment to have the correct format to be picked
up by editors, and adds `omitempty` labels for KernelMemory and KernelMemoryTCP.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-17 09:56:48 +01:00
Sebastiaan van Stijn
5d10c6ec67
Update handling of deprecated kernel (tcp) memory options
- Omit `KernelMemory` and `KernelMemoryTCP` fields in `/info` response if they're
  not supported, or when using API v1.42 or up.
- Re-enable detection of `KernelMemory` (as it's still needed for older API versions)
- Remove warning about kernel memory TCP in daemon logs (a warning is still returned
  by the `/info` endpoint, but we can consider removing that).
- Prevent incorrect "Minimum kernel memory limit allowed" error if the value was
  reset because it's not supported by the host.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-17 09:56:39 +01:00
aiordache
af6307fbda
Remove KernelMemory option from /containers/create and /update endpoints
- remove KernelMemory option from `v1.42` api docs
 - remove KernelMemory warning on `/info`
 - update changes for `v1.42`
 - remove `KernelMemory` field from endpoints docs

Signed-off-by: aiordache <anca.iordache@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-17 09:55:36 +01:00
Niel Drummond
abc2f095ab api: docs: add IPAMConfig on IPAM (v1.41)
Signed-off-by: Niel Drummond <niel@drummond.lu>
2022-03-16 06:45:21 +00:00
Sebastiaan van Stijn
8ac2f84f9a
docs: cleanup swagger API with multiple examples (v1.25-v1.41)
Applies the changes from 3671cb90a3 to
the swagger files used for the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-15 16:12:49 +01:00
Sebastiaan van Stijn
0a438f2612
api: docs: document MountPoint fields (v1.25-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-08 23:52:11 +01:00
Tianon Gravi
1d7e4111d6
Merge pull request #43301 from thaJeztah/remove_deprecated_RootFS_BaseLayer
api: remove deprecated RootFS.BaseLayer from type and docs
2022-03-08 12:25:32 -08:00
Sebastiaan van Stijn
c04dff7623
Correct type of Mounts in ContainerSummary in docs (v1.25-v1.40)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-06 18:31:28 +01:00
Michael Weidmann
16e3ca35eb
Correct type of Mounts in ContainerSummary in docs
Signed-off-by: Michael Weidmann <michaelweidmann@web.de>
2022-03-06 18:14:14 +01:00
Sebastiaan van Stijn
0759f013a4
api: docs: fix indentation of HostConfig.SecurityOpt (v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-05 22:22:02 +01:00
Sebastiaan van Stijn
352d1bb8e0
api: docs: move ContainerWaitResponse to definitions (v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-05 22:21:58 +01:00