Merge pull request #17438 from pmalmgren/17037-systemd226-cgroup

Fix docker status incorrectly reports containerized
This commit is contained in:
David Calavera 2015-11-30 11:47:16 -08:00
commit c631a9bec7
2 changed files with 23 additions and 2 deletions

View file

@ -69,7 +69,7 @@ func IsContainerized() (bool, error) {
return false, err
}
for _, line := range bytes.Split(b, []byte{'\n'}) {
if len(line) > 0 && !bytes.HasSuffix(line, []byte{'/'}) {
if len(line) > 0 && !bytes.HasSuffix(line, []byte{'/'}) && !bytes.HasSuffix(line, []byte("init.scope")) {
return true, nil
}
}