Commit Graph

3710 Commits

Author SHA1 Message Date
Paweł Gronowski
433023a03d Move namesgenerator to internal
It's frozen and only kept for historical/legacy purposes.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-10-30 19:41:58 +01:00
Austin Vazquez
a7edbe8e5f api: remove support for KernelMemoryTCP
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-09-30 10:13:51 +02:00
Austin Vazquez
fb2f8115c8 api: deprecate KernelMemoryTCP support
Starting with kernel v6.12, kernel memory TCP accounting is deprecated for cgroups v1.
Note: kernel memory TCP accounting is not supported by cgroups v2.

See d046ff46ee

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-30 10:13:30 +02:00
Sebastiaan van Stijn
c5991341eb remove support for deprecated kernel memory limit
kernel-memory limits are not supported in cgroups v2, and were obsoleted in
[kernel v5.4], producing a `ENOTSUP` in kernel v5.16. Support for this option
was removed in runc and other runtimes, as various LTS kernels contained a
broken implementation, resulting in unpredictable behavior.

We deprecated this option in [moby@b8ca7de], producing a warning when used,
and actively ignore the option since [moby@0798f5f].

Given that setting this option had no effect in most situations, we should
just remove this option instead of continuing to handle it with the expectation
that a runtime may still support it.

Note that we still support RHEL 8 (kernel 4.18) and RHEL 9 (kernel 5.14). We
no longer build packages for Ubuntu 20.04 (kernel 5.4) and Debian Bullseye 11
(kernel 5.10), which still have an LTS / ESM programme, but for those it would
only impact situations where a runtime is used that still supports it, and
an old API version was used.

[kernel v5.4]: https://github.com/torvalds/linux/commit/0158115f702b0ba208ab0
[moby@b8ca7de]: b8ca7de823
[moby@0798f5f]: 0798f5f5cf

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-16 13:08:36 +02:00
Matthieu MOREL
96f8c6395e chore: enable use-any rule from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-08-08 17:07:07 +02:00
Sebastiaan van Stijn
78ccee32b3 update various "doc" links in code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-05 20:49:57 +02:00
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
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
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
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
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
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
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
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
Sebastiaan van Stijn
450ac30e4a pkg/system: LUtimesNano: remove stub for non-Linux
It's not used, and is not carried in the new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:23 +02:00
Sebastiaan van Stijn
03f44e6d14 pkg/system: MkdirAllWithACL: remove stubs and unused os.FileMode arg
Remove the stub implementation for non-Windows platforms, and remove the
os.FileMode argument, which is ignored on Windows.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:23 +02:00
Sebastiaan van Stijn
6f9e099fd3 pkg/system: remove deprecated IsAbs
It was deprecated in f8a2550a22, but won't
be carried to the new modules.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:22 +02:00
Sebastiaan van Stijn
53a3085256 pkg/system: remove deprecated EscapeArgs
It was deprecated in 63bada41e5, but won't
be carried to the new modules.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:36:20 +02:00
Sebastiaan van Stijn
1313b8caff pkg/fileutils: move ReadSymlinkedDirectory to daemon
It has no external consumers, is written with specific behavior, making
it not a good candidate to carry in the module.

This moves it to the daemon as a non-exported `resolveSymlinkedDirectory`
utility, so that it's only accessible where it's currently used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:17:32 +02:00
Sebastiaan van Stijn
ae0a3d6918 pkg/fileutils: move ReadSymlinkedDirectory internal to daemon
It has no external consumers, is written with specific behavior (including
some potentially surprising behavior), making it not a good candidate to
carry in the module.

This moves it internal to the daemon as a non-exported utility, so that
it's only accessible where it's currently used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 11:16:25 +02:00
Sebastiaan van Stijn
bae46854c5 pkg/fileutils: remove unused CopyFile utility
It's not used, and has no external consumers; we don't have to carry it
in the new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-29 10:47:35 +02:00
Sebastiaan van Stijn
d761d9d358 pkg/rootless: move to daemon/internal
This package is used internally by the daemon, and was only used out
side of the daemon by pkg/plugins (for which we still need to look
where it should be kept).

Making it internal because it's trivial to implement if needed by
anyone. The only reason it's a package is to keep it central, and
to make it easier to discover where we have rootlesskit-specific
codepaths in our codebase.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-28 22:04:39 +02:00
Sebastiaan van Stijn
0153bebebb Merge pull request #50547 from thaJeztah/internal_stack
pkg/stack: move to daemon/internal
2025-07-28 20:44:35 +02:00
Sebastiaan van Stijn
17959aff2c remove pkg/stdcopy as it has moved to the api module
pkg/stdcopy moved to github.com/moby/moby/api/stdcopy, and the 28.4
transitional releasee will provide an alias for those that use
github.com/docker/docker as dependency, so we can remove the alias
for the moby module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-28 19:02:00 +02:00
Sebastiaan van Stijn
c055c3e098 remove pkg/stringid as it has moved to the client module
pkg/stringid moved to github.com/moby/moby/client/pkg/stringid, and
the 28.4 transitional releasee will provide an alias for those that
use github.com/docker/docker as dependency, so we can remove the
alias for the moby module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-28 19:00:17 +02:00
Sebastiaan van Stijn
76e2ca1d41 pkg/stack: move to daemon/internal
This package is used by the daemon to produce a stack-dump, It has no
external consumers, so we can move it to daemon/internal.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-28 18:39:22 +02:00
Sebastiaan van Stijn
ca1c5ee08f pkg/stringid: move to daemon, and provide copy in client
The stringid package is used in many places; while it's trivial
to implement a similar utility, let's just provide it as a utility
package in the client, removing the daemon-specific logic.

For integration tests, I opted to use the implementation in the
client, as those should not ideally not make assumptions about
the daemon implementation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-25 13:39:32 +02:00
Derek McGowan
9566272f30 Move pkg/tarsum to daemon/builder/remotecontext/internal/tarsum
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-24 12:12:23 -07:00
Derek McGowan
ca5d2348d0 Move pkg/idtools to daemon/internal/idtools
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-24 12:12:07 -07:00
Sebastiaan van Stijn
3205fcf6c7 pkg/stringid: TruncateID: touch-up doc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-24 12:41:10 +02:00
Sebastiaan van Stijn
4859497098 pkg/stdcopy: fix missing alias for stdcopy.Systemerr
This was missed in 20d594fb79

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-23 01:35:06 +02:00
Sebastiaan van Stijn
01c7b4233c hack/validate: remove obsolete exception
This was added in 20d594fb79, but was
written before the API module was added. Now that the API is a separate
module, the check will no longer flag packages importing the API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-23 01:35:00 +02:00
Sebastiaan van Stijn
36d43f1432 Merge pull request #50454 from thaJeztah/pkg_process_split
pkg/process: separate exported funcs from implementation, and fix build-tag for implementation
2025-07-21 23:25:05 +02:00
Sebastiaan van Stijn
81caabae43 Merge pull request #50462 from thaJeztah/move_stdcopy
deprecate pkg/stdcopy, move to api/stdcopy
2025-07-21 22:50:05 +02:00
Sebastiaan van Stijn
b0dbf751e1 Merge pull request #50460 from thaJeztah/tailfile_noshadow
pkg/tailfile: rename vars that shadowed type
2025-07-21 22:13:02 +02:00
Sebastiaan van Stijn
20d594fb79 deprecate pkg/stdcopy, move to api/stdcopy
The stdcopy package is used to produce and read multiplexed streams for
"attach" and "logs". It is used both by the API server (to produce), and
the client (to read / de-multiplex).

Move it to the api package, so that it can be included in the api module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-21 21:41:39 +02:00
Sebastiaan van Stijn
655dbe69d0 pkg/tailfile: rename vars that shadowed type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-20 23:10:17 +02:00
Sebastiaan van Stijn
a089c51160 pkg/idtools: remove deprecated functions and types
Remove;

- `MkdirAllAndChown`
- `MkdirAndChown`
- `MkdirAllAndChownNew`
- `GetRootUIDGID`
- `FromUserIdentityMapping`
- `ToUserIdentityMapping`
- `CurrentIdentity`
- `IdentityMapping`
- `Identity.Chown`
- `IDMap`

Also remove the temporary consts that were previously in use by BuildKit;

- `SeTakeOwnershipPrivilege`
- `ContainerAdministratorSidString`
- `ContainerUserSidString`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-20 23:06:16 +02:00
Sebastiaan van Stijn
1359046a36 pkg/process: call out that "Zombie" is only supported on Linux
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-18 16:16:08 +02:00
Sebastiaan van Stijn
94618ac3ab pkg/process: separate exported funcs from implementation
This allows us to maintain GoDoc in a single place, and for
"Kill" and "Alive" to have consistent error-handling (Windows
does not support negative process-IDs).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-18 16:16:05 +02:00
Sebastiaan van Stijn
abba330bbf Merge pull request #50208 from thaJeztah/rm_deprecated
pkg/* remove deprecated functions and packages
2025-07-14 16:18:20 +02:00
Paweł Gronowski
33f1ac3c83 Merge pull request #50398 from thaJeztah/less_pkg_system
pkg/system: remove EnableContainerdRuntime, ContainerdRuntimeSupported
2025-07-14 13:24:21 +02:00