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>
This simplifies `dockerd-rootless.sh` by removing the workaround for
`CDI: Error associated with spec file /etc/cdi: failed to monitor for changes: permission denied`.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
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>
- Introduced DefaultIsolation method in the Daemon to return the daemon configured isolation mode for Windows.
Signed-off-by: Vigilans <vigilans@foxmail.com>
Make sure Cobra is configured with the streams we use, and use
Cobra's utilities to print the validation messsage.
While updating, also add a short comment outlining why we're using
STDERR, not STDOUT for this message.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This workaround was added in 3bb40af036 to
work around a limitation of Cobra, which didn't support completion if there
are no subcommands, because [Command.InitDefaultCompletionCmd] disabled
completion, as implicitly adding the hidden `completion` and `__complete`
subcommands would break binaries without subcommands that accepted positional
args.
This problem was fixed in Cobra v1.9.0 through [cobra@24ada7f], which now
dynamically adds the `completion` subcommand when invoked.
This patch removes the hidden `__dummy_command`, which was used to work around
the logic in Cobra < v1.9.0, and to make it enable completion regardless.
Completion should still work as usual:
dockerd completion --help
Usage: dockerd completion [flags]
...
source <(dockerd completion bash)
dockerd --default-<tab>
--default-address-pool (Default address pools for node specific local networks)
--default-cgroupns-mode (Default mode for containers cgroup namespace ("host" | "private"))
--default-gateway (Default gateway IPv4 address for the default bridge network)
--default-gateway-v6 (Default gateway IPv6 address for the default bridge network)
--default-ipc-mode (Default mode for containers ipc ("shareable" | "private"))
--default-network-opt (Default network options)
--default-runtime (Default OCI runtime for containers)
--default-shm-size (Default shm size for containers)
--default-ulimit (Default ulimits for containers)
[Command.InitDefaultCompletionCmd]: https://github.com/spf13/cobra/blob/v1.8.1/completions.go#L685-L698
[cobra@24ada7f]: 24ada7fe71
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
It's no longer functional since 7435e4a1be22a5a44f945d6b45e1e81273fd868d;
(v28.1.0) this flag was purely to print the deprecation message. The
daemon.json handling still has an exception to ignore the field (if
present).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Buildkit fails when userns remapping is enabled and c8d snapshotter is
used. As a temporary workaround, disable c8d snapshotter when userns
remapping is enabled. This will need a proper fix in the future.
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This option was deprecated in Docker 27.0 through 7ea9acc97f,
and removed in 28.0 through ae96ce866f.
The field was kept to provide a user-friendly error when used; this
patch removes the field altogether.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
Modernize the field and allow using it as-is in some places, or
convert it to a string (which won't produce an error down the line).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
Packets with the given firewall mark are accepted by the bridge
driver's filter-FORWARD rules.
The value can either be an integer mark, or it can include a
mask in the format "<mark>/<mask>".
Signed-off-by: Rob Murray <rob.murray@docker.com>
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>
These functions were used internally to keep track of whether containerd
was enabled as runtime on Windows; move it to libcontainerd.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>