Commit Graph

4536 Commits

Author SHA1 Message Date
Paweł Gronowski
a0bd623959 api: remove docs/v1.53.yaml
The API is not cut yet

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 17:24:53 +01:00
Brian Goff
2ec5bdfaf6 Merge pull request #51666 from ndeloof/swagger
simplify swagger generation
2025-12-15 08:13:20 -08:00
Rob Murray
7c7a626e5d NRI: include in API Info response
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-15 10:36:05 +00:00
Rob Murray
f6b1488468 Bump API to v1.53
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-15 09:45:21 +00:00
Nicolas De Loof
caaa9c9bb5 simplify swagger generation
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-12-12 09:19:50 +01:00
Sebastiaan van Stijn
70298eb5b8 Merge pull request #51300 from rafaelcamelo31/50486_api_move_scripts
api: move scripts to generate and validate swagger to api module
2025-12-11 21:35:38 +01:00
Rafael Camelo
0666108ebf api: move scripts to generate and validate swagger to api module
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

revert api/swagger.yaml to undo formatting

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor(api): update Dockerfile and Makefile with newline at the EOF and use current best practices

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor validations and swagger generation flow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

shfmt

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor generate-swagger-api.sh to use absolute path

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

add validate-api-swagger job for GitHub Actions

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

fix validate-api-swagger ci workflow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

update go version and redoc in api module

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-11 15:16:47 +01:00
Sebastiaan van Stijn
773aca9f5d api, client: add separate LICENSE file
In a multi-module repository, the top-level LICENSE file is used for
all modules in the repository. However, when using a "replace" rule,
the vendored file is removed, but added back when removing the replace
rule.

This patch adds copies of the license to each of the modules to reduce
code-churn; these are vanilla copies downloaded from;
https://www.apache.org/licenses/LICENSE-2.0.txt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-05 15:57:55 +01:00
Kai Harder
a0e5e0525b Improve description of tmpfs mode
I recently had a great time to find out why the tmpfs mode provided did not work
until I found out that the API does not expect octal values but decimal ones.

Therefore, this PR will hopefully clarify the logic and prevent user questions in the future

Signed-off-by: Kai Harder <kai.harder@sap.com>
2025-12-02 16:34:12 +01:00
Sebastiaan van Stijn
15241265dc client, api: update go.mod to go1.24
While go1.23 still works, it's already EOL, so it may be a better
starting point to use that as minimum version for these modules, as
they're brand new.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:42:11 +01:00
Sebastiaan van Stijn
ed6d436d51 Merge pull request #51458 from thaJeztah/rm_deprecated_dockerversion
api/types/plugin: remove deprecated Config.DockerVersion
2025-11-10 18:28:56 +01:00
Sebastiaan van Stijn
e8f156110a api/types/plugin: remove deprecated Config.DockerVersion
This was deprecated in c4fda95bea, and
already omitted.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:11:45 +01:00
Sebastiaan van Stijn
34fb9de7f3 api/docs: remove links to docs.docker.com from changelog
The docker documentation website may not be publishing rendered versions
of the swagger for deprecated API versions, so let's remove these links
from the changelog.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:04:01 +01:00
Paweł Gronowski
7cff366d43 Merge pull request #51439 from thaJeztah/concrete_enums
api/types/container: make ContainerState, HealthStatus concrete types
2025-11-10 16:21:22 +01:00
Paweł Gronowski
f57da07056 Merge pull request #51454 from thaJeztah/api_volumes_no_pointer
api/types/volume: change ListResponse.Volumes to a non-pointer slice
2025-11-10 16:20:16 +01:00
Sebastiaan van Stijn
db71c6a914 api/types/container: make HealthStatus a concrete type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 16:08:15 +01:00
Sebastiaan van Stijn
1fd87e9fdf api/types/container: make ContainerState a concrete type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 16:08:12 +01:00
Rob Murray
69c4524355 Merge pull request #51437 from thaJeztah/diskusage_move_legacy
api: remove / internalize LegacyDiskUsage
2025-11-10 15:03:37 +00:00
Sebastiaan van Stijn
18000fe371 api/types/volume: change ListResponse.Volumes to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 13:13:22 +01:00
Sebastiaan van Stijn
15a048c396 api, client: don't use a pointer-slice for plugins
The backend and router don't use a pointer-slice (the server actually
doesn't use the `plugin.ListResponse` type and a straight slice);
778e5bfad3/daemon/server/router/plugin/backend.go (L20)
6baf274fa3/daemon/server/router/plugin/plugin_routes.go (L276-L280)

Align the type in the API to match, and update the type defined in the
client accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 21:02:26 +01:00
Sebastiaan van Stijn
ed428234bd api: remove / internalize LegacyDiskUsage
These fields have been removed from the API specification, and the struct
was only needed to produce legacy responses (server), or to unmarshal
legacy responses in the client.

As the API module only provides API definitions for the current API version,
we should remove these legacy structs, and keep them internal to the daemon
and client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 20:16:03 +01:00
Austin Vazquez
931c347b36 api/types: rename disk usage fields
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-06 16:21:32 -06:00
Sebastiaan van Stijn
0029924181 api/types/system: change legacyDiskUsage to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 12:31:05 +01:00
Austin Vazquez
6881ae72c7 api/types: use regular slices for disk usage types
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 22:05:47 -06:00
Austin Vazquez
fabdccbe10 api/types: move disk usage structs to per type packages
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 11:20:15 -06:00
Sebastiaan van Stijn
cdede16ce7 Merge pull request #51399 from thaJeztah/swarm_enums
api/types/swarm: create types for enum-consts
2025-11-05 16:33:20 +01:00
Sebastiaan van Stijn
39ccd04ca8 api/types/swarm: define type for RegistryAuthSource
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 13:48:38 +01:00
Sebastiaan van Stijn
d299e5be83 api/types/swarm: define type for UpdateOrder
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 12:50:51 +01:00
Sebastiaan van Stijn
b552b8b729 api/types/swarm: define type for FailureAction
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 12:50:48 +01:00
Austin Vazquez
a69abdd90d api/types/system: add type specific usage fields to DiskUsage
This change adds type specific fields to `GET /system/df` endpoint with high level information of disk usage. This change also introduces `verbose` query to the endpoint so that detailed information is by default excluded unless queried to reduce memory consumption. The previous top level `DiskUsage` fields (`Images`, `Containers`, `Volumes` and `BuildCache`) are now deprecated and kept for backwards compatibility.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-03 16:34:26 -06:00
Sebastiaan van Stijn
12c9de37e9 api/types: move Version to api/types/system
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-31 02:09:38 +01:00
Sebastiaan van Stijn
ebe464ea45 api/types: remove PushResult type, and move internal
This type was used as Aux message for docker push, was not documented,
and only present for Docker Content Trust (which is deprecated).

This patch removes it from the API module, and moves the type internal.
We can stop sending this Aux message once DCT is fully phased out.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-31 00:47:23 +01:00
Cory Snider
19f4c27d81 api/t/network: represent MAC addrs as byte slices
Make invalid states unrepresentable by moving away from stringly-typed
MAC address values in API structs. As go.dev/issue/29678 has not yet
been implemented, provide our own HardwareAddr byte-slice type which
implements TextMarshaler and TextUnmarshaler to retain compatibility
with the API wire format.

When stdlib's net.HardwareAddr type implements TextMarshaler and
TextUnmarshaler and GODEBUG=netmarshal becomes the default, we should be
able to make the type a straight alias for stdlib net.HardwareAddr as a
non-breaking change.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-10-30 17:11:38 -04:00
Sebastiaan van Stijn
0eba2989e0 api/types/registry: rename AuthenticateOKBody to AuthResponse
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-29 18:06:29 +01:00
Austin Vazquez
bae45f766d api/types/network: define ConnectRequest and DisconnectRequest
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-29 11:44:18 +01:00
Sebastiaan van Stijn
9e7e01ef16 Merge pull request #51153 from corhere/excise-json-streams-from-api
api: move `pkg/streamformatter`, `pkg/progress` to `daemon/internal`
2025-10-28 13:36:16 +01:00
Sebastiaan van Stijn
6a2a1dd6cf api/types/container: StatsResponse: add OSType field
Adds a per-stats OSType field to allow handle the platform-specific fields.
Before this change, the client had to get the OSType field from the server's
API response header and copy it to each record.

Older daemon versions don't have this field, so the client still needs to
handle fallbacks.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 16:39:32 +01:00
Sebastiaan van Stijn
3088c4e192 api/types/container: StatsResponse: cleanup fields and GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-26 20:37:40 +01:00
Cory Snider
687c3d7f42 api/types/jsonstream: define Message type
The schema of a JSON-stream message is very pertinent to the api module.
Provide a canonical definition in the api module and refactor the daemon
code to use it. Drop the long-deprecated ErrorMessage field from the API
definition, but have the daemon continue to emit it for compatibility
with docker-py v7.1.0.

Co-authored-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-24 07:56:58 -05:00
Cory Snider
ae28867804 api/pkg/progress: move to client and daemon/internal
Move the progress package up into the client as a temporary shared location for
common clients like CLI and compose.

The progress package is used by the daemon to write progress updates to
some sink, typically a streamformatter. This package is of little use to
API clients as this package does not provide any facilities to consume
the progress updates.

Co-authored-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-24 07:56:57 -05:00
Cory Snider
6baf274fa3 api/pkg/streamformatter: move to client and daemon/internal
Move the streamformatter package up into the client for a temporary
shared location between common clients like CLI and compose.

The streamformatter package is used by the daemon to write streams of
status and progress messages to API clients. It is completely out of
scope of the api module and not used outside the daemon. Remove the
unused rawSteamFormatter, whose purpose is to render the progress as a
TUI.

Co-authored-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-24 07:56:51 -05:00
Paweł Gronowski
ea59a8d74e Merge pull request #51114 from dperny/memory_flags_for_swarm
Add support for memory swap settings for services
2025-10-24 10:04:17 +02:00
Austin Vazquez
f40e1a7582 api: move types/versions to client/pkg and daemon/internal
This change moves the api/types/versions package out into client and daemon versions.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-23 19:22:31 -05:00
Paweł Gronowski
ee49bbabb3 Merge pull request #51261 from thaJeztah/fix_api_godoc
api/types: fix godoc
2025-10-22 13:35:09 +02:00
Sebastiaan van Stijn
f09ca78b45 api/types: fix godoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 12:09:04 +02:00
Sebastiaan van Stijn
8dc5d1e64d api/types: move Ping and swarm.Status to client
The API does not produce these as a response; the fields in the Ping
struct, including the Swarm status are propagated from headers returned
by the /_ping endpoint.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-22 11:05:08 +02:00
Sebastiaan van Stijn
a8950e0192 api/types/container: remove deprecated Config.MacAddress
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-21 09:15:26 +02:00
Austin Vazquez
42ba5466c7 api: rename volumes.CreateOptions to volumes.CreateRequest
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-20 13:23:41 -05:00
Jean Rouge
3a90dd8b8f Adding support for memory swap settings for services
With integration tests

Relevant Swarmkit PR: https://github.com/docker/swarmkit/pull/2816
(updated the vendored version of Swarkit to that)

Signed-off-by: Jean Rouge <rougej+github@gmail.com>

Updated for latest master, fixed bitrot.

Signed-off-by: Drew Erny <derny@mirantis.com>
2025-10-20 10:34:05 -05:00
Sebastiaan van Stijn
5061d0a74d api/types/swarm: remove deprecated ServiceSpec.Networks field
This field was deprecated in [engine-api@5c4b684], which got vendored into
Moby in [moby@8f7a8c7] (API v1.25), and wired up in [moby@99a98cc].

[engine-api@5c4b684]: 5c4b684b2f
[moby@8f7a8c7]: 8f7a8c75ae
[moby@99a98cc]: 99a98ccc14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-17 22:20:00 +02:00