Commit Graph

4558 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
0f2e9a11c2 Merge pull request #51788 from majiayu000/37671-fix-config-data-base64-description
docs: fix base64 encoding description for secrets and configs
2026-01-06 20:47:30 +01:00
Sebastiaan van Stijn
78c0257db6 Merge pull request #51791 from majiayu000/22402-improve-image-tag-description
docs: improve description of image tag API endpoint
2026-01-06 15:58:28 +01:00
Sebastiaan van Stijn
e3f60d72f4 Merge pull request #51786 from majiayu000/43810-fix-stats-api-docs-cgroups-v2
docs: update stats API description for cgroups v2 compatibility
2026-01-05 22:04:19 +01:00
Paweł Gronowski
910430d0c3 Merge pull request #51785 from majiayu000/49594-fix-api-arch-description
docs: fix reversed descriptions of version.Arch and info.Architecture
2026-01-05 15:20:00 +00:00
majiayu000
0fb55db037 docs: clarify healthcheck behavior
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-05 19:48:15 +08:00
majiayu000
22345e3369 docs: improve description of image tag API endpoint
Clarify what the /images/{name}/tag endpoint does by explaining that
it creates an additional reference (tag) to the source image, and that
existing tags will be overwritten.

The previous description "Tag an image so that it becomes part of a
repository" was unclear about what the operation actually does.

Fixes #22402

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-26 17:50:09 +08:00
majiayu000
1b9f126ede docs: document healthcheck timeout termination behavior
Document that when a health check command exceeds its configured
timeout, the process is forcibly terminated. This clarifies the
behavior for users who need predictable handling of hung health
check commands.

Fixes #45927

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-26 17:44:50 +08:00
majiayu000
955897fe21 docs: fix base64 encoding description for secrets and configs
The API documentation incorrectly stated that the Data field for
secrets and configs should use Base64-url-safe-encoded format
(RFC 4648 section 5). However, Docker actually uses standard base64
encoding (RFC 4648 section 4).

This caused confusion when users tried to use URL-safe base64 encoding
and received "illegal base64 data" errors.

Update the documentation to correctly reference RFC 4648 section 4
(standard base64) instead of section 5 (URL-safe base64).

Fixes #37671

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-26 17:42:08 +08:00
majiayu000
917d66d833 docs: update stats API description for cgroups v2 compatibility
Update the memory stats documentation to clarify differences between
cgroups v1 and v2:

- Add cgroups v2 formula for calculating used_memory using inactive_file
  instead of cache field which is not available in v2
- Update memory_stats.stats description to explain that field names
  differ between v1 (cache, rss, mapped_file) and v2 (file, anon, inactive_file)

Fixes #43810

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-26 17:28:52 +08:00
majiayu000
1fd2395cd3 docs: fix reversed descriptions of version.Arch and info.Architecture
The API documentation had incorrect descriptions for these fields:

- `/version` endpoint's `Arch` field was described generically but actually
  returns the Go runtime's GOARCH value
- `/info` endpoint's `Architecture` field incorrectly stated it returns
  GOARCH, but it actually returns the OS-reported hardware architecture
  (equivalent to `uname -m`)

This commit corrects the descriptions to accurately reflect the
implementation.

Fixes #49594

Signed-off-by: majiayu000 <1835304752@qq.com>
2025-12-26 14:34:05 +08:00
Sebastiaan van Stijn
e09afad3cb api/types/network: remove use of "reflect" in test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-23 11:26:32 +01:00
Austin Vazquez
0f0d197d78 Merge pull request #51760 from thaJeztah/fix_godoc
api/types/jsonstream: Message: fix godoc
2025-12-18 13:07:27 -06:00
Sebastiaan van Stijn
0fd5cc134b api/types/jsonstream: Message: fix godoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:04:27 +01:00
Sebastiaan van Stijn
6c845ded18 api/types/swarm: ResourceRequirements.MemorySwappiness: fix json tag
types/swarm/task.go:151:2: structtag: struct field tag `json:MemorySwappiness,omitzero"` not compatible with reflect.StructTag.Get: bad syntax for struct tag value (govet)
        MemorySwappiness *int64 `json:MemorySwappiness,omitzero"`
        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:03:13 +01:00
Paweł Gronowski
87da1c2fee Merge pull request #51745 from thaJeztah/api_go_version
api: update to go1.25.5 and remove version from Makefile
2025-12-17 12:40:07 +00:00
Sebastiaan van Stijn
e1fb5ef4a7 api: update to go1.25.5 and remove version from Makefile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 12:57:11 +01:00
Nicolas De Loof
aef5d996ce use mime-type application/jsonl to align with openapi 3.2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 11:37:48 +01:00
Sebastiaan van Stijn
b2d84a3ef5 Merge pull request #51732 from thaJeztah/sync_swagger_docs
api/docs: move ImageHistoryResponseItem to definitions (API v1.25-v1.52)
2025-12-16 13:50:34 +01:00
Paweł Gronowski
5d716f20a3 Merge pull request #51721 from vvoland/deprecate-grpc
api: deprecate /grpc and /session endpoints
2025-12-16 12:34:55 +00:00
Rob Murray
1e209e788b Continue to backfill empty PortBindings in API 1.53
- introduced by commit 0ca7ac3 ("daemon: backfill empty PBs
  slices for backward compat")

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-16 11:03:58 +00:00
Sebastiaan van Stijn
2cce7ff87f api/docs: move ImageHistoryResponseItem to definitions (API v1.25-v1.52)
Similar to caaa9c9bb5, but applied to
existing API versions, so that it's easier to compare differences
between versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 11:42:03 +01:00
Paweł Gronowski
f44b5abf0e api: deprecate /grpc and /session endpoints
The /grpc and /session endpoints are now deprecated as the Engine has
been upgraded to properly support HTTP/2 and h2c requests, making these
specialized endpoints unnecessary.

These endpoints will be removed in the next major API version to
complete the cleanup.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:44:22 +01:00
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