Create daemon.go.patch

Dockerd doesn't honor existing containerd configs and creates its own configuration file everytime it starts. So, edit the config file creation code to fix paths.
This commit is contained in:
Frederico F. de Oliveira 2021-02-02 16:54:35 +00:00 committed by Yaksh Bariya
parent f75683c6b6
commit a435d86923
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
diff --git a/moby-20.10.1/cmd/dockerd/daemon.go b/moby/cmd/dockerd/daemon.go
index 7fe8a6c..684f297 100644
--- a/moby-20.10.1/cmd/dockerd/daemon.go
+++ b/moby/cmd/dockerd/daemon.go
@@ -554,6 +554,11 @@ func (cli *DaemonCli) getContainerdDaemonOpts() ([]supervisor.DaemonOpt, error)
opts = append(opts, supervisor.WithPlugin("cri", nil))
}
+ type Config struct {Path string `toml:"path"`}
+ opts = append(opts, supervisor.WithPlugin("opt", &Config{
+ Path: "/data/docker/opt",
+ }))
+
return opts, nil
}