Commit Graph

53539 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
c98e5cb60b update github links to moby/moby
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-01 01:48:55 +02:00
Sebastiaan van Stijn
ff14d7edf0 Merge pull request #50512 from dmcgowan/make-moby-v2-module
Make `github.com/moby/moby/v2` module
2025-07-31 23:41:00 +02:00
Derek McGowan
83357620e2 Update unit test script for windows
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:49:03 -07:00
Derek McGowan
58c95cde9b Replace uses of code which requires 1.24+
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:49:03 -07:00
Derek McGowan
900a0516de Update hack/test/unit for go module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:49:02 -07:00
Derek McGowan
1d571e619d Rename build package to moby v2 module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:49:02 -07:00
Derek McGowan
65867642d3 Remove go module workarounds
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:49:02 -07:00
Derek McGowan
f74e5d48b3 Create github.com/moby/moby/v2 module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:29 -07:00
Derek McGowan
a954a0f4a2 Remove profiles
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:08 -07:00
Derek McGowan
53bd828853 Remove libnetwork
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-31 10:13:08 -07:00
Sebastiaan van Stijn
4faedf2bec Merge pull request #50583 from thaJeztah/fix_auth
Revert "api/types/registry: EncodeAuthConfig: use empty string for zero value"
2025-07-31 17:26:56 +02:00
Sebastiaan van Stijn
e55d294ea7 api/types/registry: add TODO/note about empty authConfigs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-31 15:41:33 +02:00
Sebastiaan van Stijn
8b68b977b1 Revert "api/types/registry: EncodeAuthConfig: use empty string for zero value"
This reverts commit 3a447bc079.

Some daemon versions don't handle empty values well, which resulted in
an io.EOF error when sending an empty X-Registry-Auth during decoding
or unmarshaling.

We should investigate what code-paths are hit to trigger this, but
in the meantime, let's revert this patch.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-31 15:38:41 +02:00
Akihiro Suda
39030fdf94 Merge pull request #50580 from thaJeztah/no_nat_step2
replace direct uses of nat types for api/types/container aliases
2025-07-31 14:32:23 +09:00
Sebastiaan van Stijn
5bbf3af980 daemon: fix linting S1016 (staticcheck) false positive
Staticcheck is suggesting to cast the type or to directly copy, but
doesn't account for nat.SortPortMap mutating the second argument, so
mutating the HostConfig.PortBindings. From the code, it looks like the
intent here was to prevent that (creating a deep copy), so let's keep
that.

    daemon/container_operations.go:109:39: S1016: should convert bb (type github.com/docker/docker/vendor/github.com/docker/go-connections/nat.PortBinding) to github.com/docker/docker/vendor/github.com/moby/moby/api/types/container.PortBinding instead of using struct literal (staticcheck)
                    bindings[p] = append(bindings[p], containertypes.PortBinding{
                                                      ^
    daemon/network.go:952:39: S1016: should convert bb (type github.com/docker/docker/vendor/github.com/docker/go-connections/nat.PortBinding) to github.com/docker/docker/vendor/github.com/moby/moby/api/types/container.PortBinding instead of using struct literal (staticcheck)
                    bindings[p] = append(bindings[p], containertypes.PortBinding{
                                                      ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-31 02:57:39 +02:00
Sebastiaan van Stijn
d58dc493fe replace direct uses of nat types for api/types/container aliases
Follow-up to 494677f93f, which added
the aliases, but did not yet replace our own use of the nat types.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-31 02:57:39 +02:00
Sebastiaan van Stijn
0a5fb23b35 Merge pull request #49264 from thaJeztah/jsonmessage_remove_deprecated
pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail, remove DisplayJSONMessagesToStream and Stream interface
2025-07-31 02:24:24 +02:00
Sebastiaan van Stijn
0564d7f084 Merge pull request #50573 from thaJeztah/no_nat
api/types/container: add aliases for go-connections/nat types
2025-07-31 02:18:24 +02:00
Sebastiaan van Stijn
494677f93f api/types/container: add aliases for go-connections/nat types
This allows us to update code to not be attached to go-connections
directly (in future we may be able to move the types to be concrete
types).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 23:46:56 +02:00
Sebastiaan van Stijn
f3ba0b2dc2 client/pkg/jsonmessage: remove Stream interface
It was an interface to match CLI-specific primitives and is no
longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 23:22:12 +02:00
Sebastiaan van Stijn
19edf5c53c client/pkg/jsonmessage: remove DisplayJSONMessagesToStream
It was an adaptor around DisplayJSONMessagesStream for CLI-specific
primitives that was used in the CLI, but can be implemented by users
of this package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 23:22:09 +02:00
Sebastiaan van Stijn
fdaccdb233 pkg/jsonmessage: stop printing deprecated progressDetail, errorDetail
The API still returns it for backward-compatibility (but probably
shouldn't), but we should no longer print it. This removes the
use of these fields for printing, but keeps them for streamformatter
to use.

- ErrorMessage was deprecated in 3043c26419
- ProgressMessage was deprecated in 597e0e69b4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 22:51:13 +02:00
Sebastiaan van Stijn
7bb2a15294 Merge pull request #50565 from dmcgowan/move_jsonmessage
Move jsonmessage, streamformatter, and progress
2025-07-30 18:55:51 +02:00
Sebastiaan van Stijn
263a21705b Merge pull request #50574 from thaJeztah/remove_NoBaseImageSpecifier
api: remove deprecated NoBaseImageSpecifier
2025-07-30 16:41:50 +02:00
Sebastiaan van Stijn
94ac102e4b api: remove deprecated NoBaseImageSpecifier
It was deprecated in 7b9bd987bf, but
won't be carried in the API module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 15:00:59 +02:00
Derek McGowan
0d8ca8eefe Move pkg/jsonmessage to client/pkg/jsonmessage
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:31 +02:00
Derek McGowan
d00ecdc479 Move pkg/streamformatter to api/pkg/streamformatter
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:31 +02:00
Derek McGowan
66862e14d1 Move pkg/progress to api/pkg/progress
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:31 +02:00
Derek McGowan
1da417980c Move api/stdcopy to api/pkg/stdcopy
Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:30 +02:00
Derek McGowan
ebef4a44fd Split streamformatter from jsonmessage
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-30 14:22:30 +02:00
Sebastiaan van Stijn
5a144c40e2 pkg/streamformatter: reduce jsonmessage.JSONMessage dependency
This package depends on jsonformatter.JSONProgress and jsonmessage.JSONMessage,
and it looks like it requires some of those for their stringer interface.

Signed-off-by: Derek McGowan <derek@mcg.dev>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:30 +02:00
Sebastiaan van Stijn
f4127d76c5 pkg/jsonmessage: move JSONProgress to api/types/jsonstream
Move the type to the API, but embed it, so that we keep the
methods on the struct in this package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 14:22:30 +02:00
Sebastiaan van Stijn
0515e1c991 pkg/jsonmessage: move JSONError to api/types/jsonstream
Also rename api type JSONError to Error

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-30 14:22:27 +02:00
Sebastiaan van Stijn
6453f9d5f4 Merge pull request #50570 from thaJeztah/jsonmessage_less_deps
pkg/jsonmessage: remove github.com/morikuni/aec dependency
2025-07-30 14:21:32 +02:00
Sebastiaan van Stijn
bda72b5c57 Merge pull request #50571 from thaJeztah/daemon_no_jsonstream
Add separate const for daemon httputils to avoid jsonmessage import
2025-07-30 14:21:08 +02:00
Sebastiaan van Stijn
7c626bea7e Merge pull request #50569 from thaJeztah/tidy_vendor
tidy vendor.mod
2025-07-30 14:20:48 +02:00
Sebastiaan van Stijn
9a52e474a3 pkg/jsonmessage: suppress unhandled errors
Keep the linters happy.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 12:48:02 +02:00
Derek McGowan
02fcde0c18 Add separate const for daemon httputils to avoid jsonmessage import
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-30 12:41:46 +02:00
Sebastiaan van Stijn
e257027903 pkg/jsonmessage: remove github.com/morikuni/aec dependency
We can probably use [aec.EmptyBuilder] for managing the output, but
currently we're doing it all manually, so defining some consts for
the basics we use.

[aec.EmptyBuilder]: https://pkg.go.dev/github.com/morikuni/aec#EmptyBuilder

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 12:34:45 +02:00
Sebastiaan van Stijn
d7082848a6 tidy vendor.mod
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-30 12:17:56 +02:00
Sebastiaan van Stijn
2574c2b2e9 Merge pull request #50561 from thaJeztah/internalize_legacy_filter
api/types/filters: remove deprecated ToParamWithVersion
2025-07-29 14:50:42 +02:00
Sebastiaan van Stijn
1be59a838d Merge pull request #50558 from thaJeztah/cleanup_fileutils
remove pkg/fileutils, and move its functionality where used
2025-07-29 13:49:52 +02:00
Sebastiaan van Stijn
7381c0da6e Merge pull request #50554 from dmcgowan/move-logdriver-interface
Move logdriver interface
2025-07-29 13:47:47 +02:00
Sebastiaan van Stijn
0e582c691e Merge pull request #50557 from thaJeztah/registry_deadcode
daemon/pkg/registry: remove unused code
2025-07-29 13:38:00 +02:00
Sebastiaan van Stijn
12b761321b Merge pull request #50559 from thaJeztah/pkg_system_clean
pkg/system: move to daemon/internal
2025-07-29 13:05:40 +02:00
Sebastiaan van Stijn
6c7e2909c2 api/types/filters: remove deprecated ToParamWithVersion
It's only used by the client to support API versions older than v1.22.
Make it an internal utility that doesn't depend on internal fields of
`filter.Args`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 13:04:39 +02:00
Sebastiaan van Stijn
5535e81a79 pkg/system: move to daemon/internal
It has no external users, and this package still has too many different
responsibilities, some of which may be available elsewhere, so moving it
internal so that we can decide to dismantle it further.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:48:57 +02:00
Sebastiaan van Stijn
d94171bfaa pkg/system: make XattrError linux-only
It's only produced in Linux code, so put it in a Linux-only file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:23 +02:00
Sebastiaan van Stijn
aa9de914ca pkg/system: remove unused ErrNotSupportedPlatform
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:23 +02:00
Sebastiaan van Stijn
28b822d5b3 pkg/system: remove Lgetxattr, Lsetxattr stubs for non-Linux
It's only used in Linux code. Remove the stubs, which are not carried
forward into the module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:23 +02:00