Fix docker status incorrectly reports containerized. Fixes #17037
Signed-off-by: Peter Malmgren <ptmalmgren@gmail.com>
This commit is contained in:
parent
9f0f24ea63
commit
39e1568228
2 changed files with 23 additions and 2 deletions
|
@ -36,7 +36,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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue