Commit graph

7181 commits

Author SHA1 Message Date
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
219374e2cd
Merge pull request #43275 from kponichtera/43274-delve-debugger
Added Delve debugger to the development container
2022-05-10 18:34:45 +02:00
Sebastiaan van Stijn
b963ba4a1e
Merge pull request #43452 from kponichtera/43451-contribution-guide-set-up-ide
Extended contribution guide with how to make IDEs recognize Moby’s repository as a Go project
2022-04-29 15:03:24 +02:00
Konrad Ponichtera
cc8dd9b4a7
Extended contribution guide with how to enable GoLand IDE syntax highlighting and code completion in Moby project
Signed-off-by: Konrad Ponichtera <konpon96@gmail.com>
2022-04-26 21:34:54 +02:00
Konrad Ponichtera
7d328ea1d6
Added Delve debugger to the development container (including instructions in the contribution guide).
Signed-off-by: Konrad Ponichtera <konpon96@gmail.com>
2022-04-26 20:14:06 +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
Sebastiaan van Stijn
444b27910c
api: docs: move VolumeCreateOptions to definitions (v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-05 22:21:49 +01:00
Sebastiaan van Stijn
5c0aae359f
api: docs: move Volume examples inline (v1.39-v1.41)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-05 21:48:38 +01:00
Sebastiaan van Stijn
8e9c8ff7f2
api: docs: remove deprecated RootFS.BaseLayer (API v1.25-v1.41)
This field was used when Windows did not yet support regular images, and required
the base-image to pre-exist on the Windows machine (as those layers were not yet
allowed to be distributed).

Commit f342b27145 (docker 1.13.0, API v1.25) removed
usage of the field. The field was not documented in the API, but because it was not
removed from the Golang structs in the API, ended up in the API documentation when
we switched to using Swagger instead of plain MarkDown for the API docs.

Given that the field was never set in any of these API versions, and had an "omitempty",
it was never actually returned in a response, so should be fine to remove from these
API docs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-05 17:59:44 +01:00
Sebastiaan van Stijn
d19dd22257
api: docs: fix warning about comment indentation (API v1.40-v1.41)
5428:7 warning comment not indented like content (comments-indentation)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-03 22:55:32 +01:00
Sebastiaan van Stijn
9565606222
api: docs: update docs for /images/{name}/json (API v1.39-v1.41)
- rename definition in swagger from `Image` to `ImageInspect` to match the go type
- improve (or add) documentation for various fields
- move example values in-line in the "definitions" section
- remove the `required` fields from `ImageInspect`, as the type is only used as
  response type (not to make requests).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-03 22:55:25 +01:00
Sebastiaan van Stijn
36ec581e5c
Merge pull request #43277 from thaJeztah/fix_kernelmem_docs_and_error
api: add missing docs for KernelMemoryTCP, and fix error message
2022-03-03 19:33:49 +01:00
Brian Goff
7c764a29b0
Merge pull request #43235 from thaJeztah/api_wait_fixes
Assorted (documentation) fixes for `POST /containers/{id}/wait`
2022-02-23 15:13:18 -08:00
Dan Plamadeala
9393cf73f6 removed mentions of the archived Docker CE repo
Signed-off-by: Dan Plamadeala <cornul11@gmail.com>
2022-02-23 12:13:12 +01:00
Sebastiaan van Stijn
9f3c238c29
docs: add missing KernelMemoryTCP to api v1.40 and v1.41
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-22 10:25:46 +01:00
Tianon Gravi
d666358dcd
Merge pull request #43170 from thaJeztah/api_docs_fixes
docs: update API v1.41 and v1.40 docs with fixes from api/swagger
2022-02-17 11:09:51 -08:00
Sebastiaan van Stijn
737e8c6ab8
api: POST /containers/{id}/wait: validate "condition" parameter
The endpoint was silently ignoring invalid values for the "condition" parameter.
This patch now returns a 400 status if an unknown, non-empty "condition" is passed.

With this patch:

    curl --unix-socket /var/run/docker.sock -XPOST 'http://localhost/v1.41/containers/foo/wait?condition=foobar'
    {"message":"invalid condition: \"foobar\""}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-14 21:47:55 +01:00
Sebastiaan van Stijn
5e2b7dea02
docs/api: add missing 400 response for POST /containers/{id}/wait
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-14 21:47:51 +01:00
Sebastiaan van Stijn
41b137962d
docs/api: update /containers/{id}/wait "condition" parameter (v1.30-v1.41)
This patch updates the swagger, and:

- adds an enum definition to document valid values (instead of describing them)
- updates the description to mention both "omitted" and "empty" values (although
  the former is already implicitly covered by the field being "optional" and
  having a default value).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-14 21:47:38 +01:00