diff options
author | Derek McGowan <derek@mcgstyle.net> | 2018-06-19 15:53:40 -0700 |
---|---|---|
committer | Derek McGowan <derek@mcgstyle.net> | 2018-07-24 11:34:47 -0700 |
commit | 8fb5f4d5c9b4933be31bf5371d65a95edb037261 (patch) | |
tree | c670ab0e2aa2afd7bab52c9106fabe755c5740b5 /cmd | |
parent | cc7cda1968062fc6dde28c93e85a0192d58b6d90 (diff) | |
download | docker-8fb5f4d5c9b4933be31bf5371d65a95edb037261.tar.gz |
Add configuration option for containerd cri
Disable cri plugin by default in containerd and
allows an option to enable the plugin. This only
has an effect on containerd when supervised by
dockerd. When containerd is managed outside of
dockerd, the configuration is not effected.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dockerd/config.go | 1 | ||||
-rw-r--r-- | cmd/dockerd/daemon_unix.go | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cmd/dockerd/config.go b/cmd/dockerd/config.go index abdac9a7fb..adf26f82a6 100644 --- a/cmd/dockerd/config.go +++ b/cmd/dockerd/config.go @@ -29,6 +29,7 @@ func installCommonConfigFlags(conf *config.Config, flags *pflag.FlagSet) { flags.StringVarP(&conf.Root, "graph", "g", defaultDataRoot, "Root of the Docker runtime") flags.StringVar(&conf.ExecRoot, "exec-root", defaultExecRoot, "Root directory for execution state files") flags.StringVar(&conf.ContainerdAddr, "containerd", "", "containerd grpc address") + flags.BoolVar(&conf.CriContainerd, "cri-containerd", false, "start containerd with cri") // "--graph" is "soft-deprecated" in favor of "data-root". This flag was added // before Docker 1.0, so won't be removed, only hidden, to discourage its usage. diff --git a/cmd/dockerd/daemon_unix.go b/cmd/dockerd/daemon_unix.go index a88bcccc0c..51e56673a0 100644 --- a/cmd/dockerd/daemon_unix.go +++ b/cmd/dockerd/daemon_unix.go @@ -56,6 +56,9 @@ func (cli *DaemonCli) getPlatformRemoteOptions() ([]libcontainerd.RemoteOption, } else { opts = append(opts, libcontainerd.WithStartDaemon(true)) } + if !cli.Config.CriContainerd { + opts = append(opts, libcontainerd.WithPlugin("cri", nil)) + } return opts, nil } |