Commit Graph

55462 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
9f2faa5cec client: fix TestWithUserAgent
This test was testing the /_ping endpoint, which is intercepted by
the default MockClient.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-09 13:58:04 +01:00
Sebastiaan van Stijn
00166d05d9 Merge pull request #51782 from austinvazquez/add-api-go-package
api: add root doc.go to prevent fallback to github.com/moby/moby
2026-01-08 20:55:41 +01:00
Paweł Gronowski
fbe29f0624 Merge pull request #51816 from thaJeztah/fix_linting
internal/testutil/daemon: fix minor linting issues
2026-01-08 16:59:02 +00:00
Sebastiaan van Stijn
48f81c3782 Merge pull request #51828 from vvoland/windows-network-none
daemon/libnetwork: Fix panic in findHNSEp when IP networks are nil
2026-01-08 17:34:36 +01:00
Sebastiaan van Stijn
7bdc7569f1 Merge pull request #51827 from vvoland/fix-image-mount
daemon/volumes: More fs friendly image mount layer names
2026-01-08 16:41:39 +01:00
Paweł Gronowski
fadd8dc47c daemon/libnetwork: Fix panic in findHNSEp when IP networks are nil
Can happen for `docker run --network none ...`

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-01-08 15:01:10 +01:00
Paweł Gronowski
cb88c6ba10 daemon/volumes: More fs friendly image mount layer names
Hash the container ID, mount source and destination together to form a
layer name.

This ensures the generated names are filesystem-friendly and don't
exceed path length limits while maintaining uniqueness across different
mount points and containers.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-01-08 12:20:47 +01:00
Rob Murray
911d311adf Merge pull request #51585 from 2003Aditya/TestAPIOptionsRoute
migrate TestAPIOptionsRoute to integration test
2026-01-07 15:33:27 +00:00
Paweł Gronowski
80fea4a88d Merge pull request #51813 from thaJeztah/lint_repodir
hack/validate: only search repo-dir for modules
2026-01-07 10:51:47 +00:00
Paweł Gronowski
5a60541bf2 Merge pull request #51818 from thaJeztah/update_swagger_docs
api/docs: backport assorted fixes and enhancements to older api versions
2026-01-07 10:41:52 +00:00
Sebastiaan van Stijn
8f1457a373 Merge pull request #51817 from corhere/client/clone-http-client
client: do not modify user-provided HTTP client
2026-01-07 11:11:16 +01:00
Akihiro Suda
015cd3d3fd Merge pull request #51815 from thaJeztah/bump_cloud_logging
vendor: cloud.google.com/go/logging v1.13.1
2026-01-07 13:03:10 +09:00
Cory Snider
9ebbf652bd client: do not modify user-provided HTTP client
The http.Client passed into client.WithHTTPClient() is modified by the
constructor in-place: the value of its Transport field is mutated and
wrapped in an OpenTelemetry decorator. This can lead to very surprising
behaviour when a second client is constructed reusing the same
http.Client value. If the http.Client is configured for TLS, the second
client will fail to detect that and will incorrectly dial the Engine API
socket as cleartext HTTP. Copy the provided http.Client so our
modifications don't leak out to unexpected places.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2026-01-06 18:14:13 -05:00
Sebastiaan van Stijn
41d19f6644 api/docs: backport assorted fixes and enhancements to older api versions
This syncs the versioned swagger files with some fixes and enhancements
made in:

- 955897fe21
- 22345e3369
- 917d66d833
- 1fd2395cd3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-06 22:37:50 +01:00
Sebastiaan van Stijn
f2f622ebf4 internal/testutil/daemon: fix minor linting issues
- rename vars that shadowed
- suppress some unhandled errors

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-06 21:46:28 +01:00
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
0dedfa8223 Merge pull request #51812 from thaJeztah/resolvconf_improve_err
libnet/internal/resolvconf: Parse: improve error message
2026-01-06 15:53:12 +01:00
Sebastiaan van Stijn
4bcf9665af vendor: cloud.google.com/go/logging v1.13.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-06 15:10:53 +01:00
Sebastiaan van Stijn
0d27c51913 hack/validate: only search repo-dir for modules
Minor enhancement / follow-up to c8aaeea285c63f9add09e01bd8260d1bce61a97d;
make sure we never attempt to find `go.mod` files in other locations.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-06 14:56:37 +01:00
Sebastiaan van Stijn
07e2a782c7 libnet/internal/resolvconf: Parse: improve error message
When attempting to read a (malformed) resolv.conf with a very long line,
a obscure error would be produced that didn't provide much context to
identify the problem;

    Handler for POST /v1.51/containers/mariadb11/start returned error: bufio.Scanner: token too long

This patch adds some additional error-handling to detect this situation,
and includes the filename of the resolv.conf to help the user locating
the file that failed to be parsed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-06 14:43:51 +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
Sebastiaan van Stijn
5275f5f33c Merge pull request #51809 from GSotelo/fix/typo-in-comments
docs: fix typo in IPv6 constant comment
2026-01-05 17:52:32 +01:00
Sebastiaan van Stijn
5f38f0644c Merge pull request #51805 from thaJeztah/simplify_reflect
integration/container: TestStats: explicitly check zero-value
2026-01-05 17:49:10 +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
Sebastiaan van Stijn
4c9fe4de6a Merge pull request #51807 from mismithhisler/use-afterFunc-stop-func
client: use stop function to deregister context.AfterFunc
2026-01-05 16:09:58 +01:00
gsotelo
32d34c472c docs: fix type in comment
Signed-off-by: gsotelo <gsotelo.se@gmail.com>
2026-01-05 15:27:23 +01:00
Paweł Gronowski
0da7c60458 Merge pull request #51804 from thaJeztah/no_shadow
daemon: minor cleanup and linting fixes
2026-01-05 14:19:12 +00:00
Sebastiaan van Stijn
d6eee94dd2 Merge pull request #51789 from majiayu000/45927-doc-healthcheck-timeout-kill
docs: document healthcheck timeout termination behavior
2026-01-05 15:13:32 +01:00
Sebastiaan van Stijn
a28aa590ca Merge pull request #51806 from thaJeztah/fix_err_typo
daemon/server/httputils: remove badParameterError
2026-01-05 15:07:05 +01:00
Michael Smithhisler
06704ef904 client: use stop function to deregister context.AfterFunc
Signed-off-by: Michael Smithhisler <smithhisler.mike@gmail.com>
2026-01-05 08:24:48 -05:00
Sebastiaan van Stijn
d85c1a258a daemon/server/httputils: remove badParameterError
The "param" field was only used to generate the error-message, and the
produced error-message was missing a space so we may as well just inline it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-05 13:51:59 +01:00
Rob Murray
9f92b72f2f Merge pull request #51553 from 2003Aditya/TestAPIImagesImportBadSrc
migrate TestAPIImageImportBadSrc to integration test
2026-01-05 12:41:58 +00:00
Sebastiaan van Stijn
e529aa7d7c integration/container: TestStats: explicitly check zero-value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-05 13:40:04 +01:00
majiayu000
0fb55db037 docs: clarify healthcheck behavior
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-05 19:48:15 +08:00
Sebastiaan van Stijn
dcb0149ee1 daemon: inline copyAttributes utilty
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-05 12:42:49 +01:00
Sebastiaan van Stijn
8a01dc2f90 daemon/cluster/executor/container: rename vars that shadowed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-05 12:42:49 +01:00
Paweł Gronowski
92a240fd42 Merge pull request #51797 from lujinda/fix_shutdown_panic
fix: prevent potential panic in Shutdown when EventsService is nil
2026-01-02 14:54:41 +00:00
Paweł Gronowski
5b18361f07 Merge pull request #51783 from austinvazquez/run-golangci-lint-for-all-modules
ci: run golangci-lint for each Go module
2026-01-02 14:52:56 +00:00
jinda.ljd
5c637b7209 fix: prevent potential panic in Shutdown when EventsService is nil
Add nil check before calling EventsService.Close() to prevent panic
when daemon.EventsService is not initialized during shutdown.

Signed-off-by: jinda.ljd <jinda.ljd@alibaba-inc.com>
2025-12-30 20:19:09 +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
Aditya Mishra
ae4c17fdb7 migrate TestAPIImageImportBadSrc to integration test
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
2025-12-26 00:40:48 +05:30
Aditya Mishra
93afda3670 migrate TestAPINetworkInspectWithScope to integration test
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
2025-12-26 00:27:41 +05:30
Austin Vazquez
c8aaeea285 ci: run golangci-lint for each Go module
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-12-23 14:58:53 -06:00
Sebastiaan van Stijn
3bd2edb375 Merge pull request #51784 from thaJeztah/api_less_reflect
api/types/network: remove use of "reflect" in test
2025-12-23 12:31:11 +01: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