moby--moby/cmd/dockerd
Sebastiaan van Stijn ba2ff69894
libcontainerd: switch generated containerd.toml to v2 (v1 is deprecated)
Before this patch:

    INFO[2022-07-27T14:30:06.188762628Z] Starting up
    INFO[2022-07-27T14:30:06.190750725Z] libcontainerd: started new containerd process  pid=2028
    ...
    WARN[0000] containerd config version `1` has been deprecated and will be removed in containerd v2.0, please switch to version `2`, see https://github.com/containerd/containerd/blob/main/docs/PLUGINS.md#version-header
    INFO[2022-07-27T14:30:06.220024286Z] starting containerd                           revision=10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 version=v1.6.6

With this patch:

    INFO[2022-07-27T14:28:04.025543517Z] Starting up
    INFO[2022-07-27T14:28:04.027447105Z] libcontainerd: started new containerd process  pid=1377
    ...
    INFO[2022-07-27T14:28:04.054483270Z] starting containerd                           revision=10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 version=v1.6.6

And the generated /var/run/docker/containerd/containerd.toml:

```toml
disabled_plugins = ["io.containerd.grpc.v1.cri"]
imports = []
oom_score = 0
plugin_dir = ""
required_plugins = []
root = "/var/lib/docker/containerd/daemon"
state = "/var/run/docker/containerd/daemon"
temp = ""
version = 2

[cgroup]
  path = ""

[debug]
  address = "/var/run/docker/containerd/containerd-debug.sock"
  format = ""
  gid = 0
  level = "debug"
  uid = 0

[grpc]
  address = "/var/run/docker/containerd/containerd.sock"
  gid = 0
  max_recv_message_size = 16777216
  max_send_message_size = 16777216
  tcp_address = ""
  tcp_tls_ca = ""
  tcp_tls_cert = ""
  tcp_tls_key = ""
  uid = 0

[metrics]
  address = ""
  grpc_histogram = false

[plugins]

[proxy_plugins]

[stream_processors]

[timeouts]

[ttrpc]
  address = ""
  gid = 0
  uid = 0
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-27 16:33:00 +02:00
..
trap gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
README.md Fix readme doc for dockerd 2016-09-01 14:47:51 +08:00
config.go daemon: remove deprecated fields and flags for cluster-advertise 2022-07-12 15:39:20 +02:00
config_unix.go daemon/config: New(): set more defaults 2022-06-29 19:59:18 +02:00
config_unix_test.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
config_windows.go registry: remove dependency on rootlesskit, add `SetCertsDir()` 2022-03-25 16:21:45 +01:00
daemon.go libcontainerd: switch generated containerd.toml to v2 (v1 is deprecated) 2022-07-27 16:33:00 +02:00
daemon_freebsd.go daemon: move check for CPU-realtime daemon options 2022-03-03 19:50:27 +01:00
daemon_linux.go daemon: move check for CPU-realtime daemon options 2022-03-03 19:50:27 +01:00
daemon_test.go cmd/dockerd: loadDaemonCliConfig() safeguard for unparsed flags 2022-06-29 19:55:06 +02:00
daemon_unix.go daemon: improve some errors 2022-06-29 19:54:57 +02:00
daemon_unix_test.go cmd/dockerd: produce error when using discovery options 2022-01-06 18:28:15 +01:00
daemon_windows.go daemon: move check for CPU-realtime daemon options 2022-03-03 19:50:27 +01:00
docker.go cmd/dockerd: un-export config methods, and don't pass flags "twice" 2022-04-27 00:34:17 +02:00
docker_unix.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
docker_windows.go use go-winres for windows build and cleanup autogen and winresources 2022-04-14 19:52:36 +02:00
genwinres_windows.go use go-winres for cross to create Windows resources 2022-04-14 19:52:35 +02:00
metrics.go Do not require "experimental" for metrics API 2020-04-20 22:19:00 +02:00
options.go cmd/dockerd: un-export config methods, and don't pass flags "twice" 2022-04-27 00:34:17 +02:00
options_test.go cmd/dockerd: un-export config methods, and don't pass flags "twice" 2022-04-27 00:34:17 +02:00
service_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
service_windows.go Windows: require Windows Server RS5 / ltsc2019 (build 17763) as minimum 2022-02-18 22:58:28 +01:00

README.md

docker.go contains Docker daemon's main function.

This file provides first line CLI argument parsing and environment variable setting.