Skip to content

Commit

Permalink
Recognize systemd based cgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
vjsamuel committed Nov 1, 2019
1 parent 8fe4c3c commit 64e7342
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/linux/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func isContainerizedCgroup(data []byte) (bool, error) {

// Following a suggestion on Stack Overflow on how to detect
// being inside a container: https://stackoverflow.com/a/20012536/235203
if bytes.Contains(line, []byte("docker")) || bytes.Contains(line, []byte("lxc")) {
if bytes.Contains(line, []byte("docker")) || bytes.Contains(line, []byte(".slice")) || bytes.Contains(line, []byte("lxc")) {
return true, nil
}
}
Expand Down

0 comments on commit 64e7342

Please sign in to comment.