Handle Docker daemon named 'dockerd'

This commit is contained in:
Bryan Boreham committed 2016-06-17 13:05:35 +01:00
1 parent 95b42a532a
commit ddd039761d
1 file changed
+6 -2
+6 -2
View File
@@ -26,7 +26,12 @@ func dockerTLSArgs(args []string) error {
continue
}
if comm, err := ioutil.ReadFile(filepath.Join(procRoot, dirName, "comm")); err != nil || string(comm) != "docker\n" {
isDaemon := false
if comm, err := ioutil.ReadFile(filepath.Join(procRoot, dirName, "comm")); err != nil {
continue
} else if string(comm) == "dockerd\n" {
isDaemon = true
} else if string(comm) != "docker\n" {
continue
}
@@ -35,7 +40,6 @@ func dockerTLSArgs(args []string) error {
continue
}
isDaemon := false
tlsArgs := []string{}
args := bytes.Split(cmdline, []byte{'\000'})
for i := 0; i < len(args); i++ {