Commit Graph

40 Commits

Author SHA1 Message Date
Akihiro Suda
cd4397b4dc cdi: read XDG_CONFIG_HOME/cdi and XDG_RUNTIME_DIR/cdi for rootless
Fix issue 51601

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-12-02 02:30:14 +09:00
Cory Snider
4535d63c91 daemon: install OpenCensus-to-OTEL trace bridge
Export trace spans from the github.com/microsoft/hcsshim module, which
is instrumented with OpenCensus, to the daemon's OpenTelemetry exporter
to provide more visibility into Windows container lifecycle operations.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-11-13 15:00:05 -05:00
Vigilans
d192a63467 daemon: Ensure buildkit created container's isolation mode consistent with daemon's config
- Introduced DefaultIsolation method in the Daemon to return the daemon configured isolation mode for Windows.

Signed-off-by: Vigilans <vigilans@foxmail.com>
2025-11-10 16:33:14 +01:00
Sebastiaan van Stijn
d9a03a374f daemon: consolidate "log-level" and "log-format" options and flags
The `LogLevel` and `LogFormat` options were defined in two locations;

- in the `daemon/commands.daemonOptions` struct.
- in the `daemon/config.Config` (`CommonConfig`) struct.

While we may need some options-struct to initialize the daemon, we currently
don't and the separate structs means they have to be kept in sync, and for
flags to be distributed across multiple places.

Note that some flags will not be configurable in the config-file (such as
the path of the config-file itself), so those options will need to have a
separate struct (which may still live in the `daemon/config` package).

This patch;

- Removes the `LogLevel` and `LogFormat` from `daemon/commands.daemonOptions`
  to `daemon/config.CommonConfig`.
- Adds a bare-bones `stringVar` implementation using generics to allow using
  strong-typed string values to be used for flags.
- Moves the flags together with the other flags in `installCommonConfigFlags`.
- Sets the default options in the `Config` struct.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-16 10:02:47 +02:00
Sebastiaan van Stijn
4e6c955e78 daemon/command: configureDaemonLogs: don't panic
Return an error instead of panicking.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-16 10:02:46 +02:00
Sebastiaan van Stijn
c73fe6d26e daemon/config: move daemon log-config to a separate struct
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-16 10:02:43 +02:00
Sebastiaan van Stijn
c584855329 daemon/command: configureProxyEnv: accept smaller struct
Also pass through the context

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-16 01:27:20 +02:00
Sebastiaan van Stijn
e46a991dc5 api: remove unused DefaultVersion, MinSupportedAPIVersion consts
These consts are no longer used, and separate consts were added in both
the client and daemon packages;

- client: 41da5700a4
- daemon: a632b8495b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-09-04 07:30:35 -05: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
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
75bc4c5292 daemon/server/router/container: request sysInfo from daemon / backend
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-28 18:32:14 +02:00
Sebastiaan van Stijn
5e567a3856 daemon/server/httputils: remove ContainerDecoder interface
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-28 18:32:14 +02:00
Sebastiaan van Stijn
be27300c6e daemon/server/router/checkpoint: remove unused httputils.ContainerDecoder
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-27 15:19:50 +02:00
Derek McGowan
c3b0e0130a Move internal/otelutil to daemon/internal/otelutil
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-24 12:14:30 -07:00
Sebastiaan van Stijn
a632b8495b daemon: define default (and maximum) API version
With the daemon and API migrating to separate modules, users of the daemon
module may upgrade the API module to higher versions. Currently, the daemon
uses the API's Default version. While the version of the API module is
allowed to be updated (following SemVer), we should not allow the Daemon
to support higher API versions than it was written for.

This patch introduces a DefaultAPIVersion in the daemon/config package that is
used as default version of the API for the daemon to use.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-07-17 14:35:05 +02:00
Derek McGowan
af86e80825 Move daemon/build to daemon/builder/backend
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-16 15:06:15 -07:00
Derek McGowan
7d48302134 Move builder to daemon/builder
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-16 15:06:00 -07:00
Derek McGowan
6ff9bea6a7 Move builder/builder-next to daemon/internal/builder-next
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-16 15:05:44 -07:00
Derek McGowan
f05652867d Move opts to daemon/pkg/opts
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-14 09:25:05 -07:00
Derek McGowan
841a369b8f Move libcontainerd/supervisor to daemon/internal/libcontainerd/supervisor
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 14:28:40 -07:00
Derek McGowan
3581b982f7 Move plugin to daemon/pkg/plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 14:26:33 -07:00
Derek McGowan
87238882e0 Move api/server to daemon/server
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:18:20 -07:00
Derek McGowan
3a6e3f85c6 Move api/server/backend/build to daemon/build
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:18:05 -07:00
Derek McGowan
d64bd2cceb Move api/server/middleware to daemon/server/middleware
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:17:18 -07:00
Derek McGowan
72a020fcd8 Move api/server/router to daemon/server/router
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:17:02 -07:00
Derek McGowan
f293628f55 Move api/server/router/volume to daemon/server/router/volume
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:16:46 -07:00
Derek McGowan
15c8007064 Move api/server/router/system to daemon/server/router/system
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:16:31 -07:00
Derek McGowan
45172bbf23 Move api/server/router/swarm to daemon/server/router/swarm
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:16:15 -07:00
Derek McGowan
f6ba5a5241 Move api/server/router/session to daemon/server/router/session
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:16:00 -07:00
Derek McGowan
3eb5fe0277 Move api/server/router/plugin to daemon/server/router/plugin
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:15:44 -07:00
Derek McGowan
baa58ddc6a Move api/server/router/network to daemon/server/router/network
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:15:28 -07:00
Derek McGowan
0cbb4ac8e6 Move api/server/router/image to daemon/server/router/image
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:15:13 -07:00
Derek McGowan
a063389af7 Move api/server/router/grpc to daemon/server/router/grpc
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:14:58 -07:00
Derek McGowan
9ff489863c Move api/server/router/distribution to daemon/server/router/distribution
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:14:42 -07:00
Derek McGowan
ced7798ed8 Move api/server/router/debug to daemon/server/router/debug
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:14:26 -07:00
Derek McGowan
3a9db5fbd6 Move api/server/router/container to daemon/server/router/container
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:14:11 -07:00
Derek McGowan
d6136b660f Move api/server/router/checkpoint to daemon/server/router/checkpoint
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:13:55 -07:00
Derek McGowan
31b6886eb1 Move api/server/router/build to daemon/server/router/build
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-27 09:13:40 -07:00
Matthieu MOREL
381d9d0723 fix use-errors-new from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2025-06-26 12:07:38 +00:00
Derek McGowan
33139da522 Split part of dockerd main to command under daemon
Allows using daemon/internal packages when creating dockerd

Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-06-23 14:45:03 -07:00