Skip to content

Commit 49d5392

Browse files
committed
Adjusting regexp for difference cgroup formats
1 parent 66719b6 commit 49d5392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func GetCurrentContainerID() string {
169169
scanner := bufio.NewScanner(reader)
170170
scanner.Split(bufio.ScanLines)
171171

172-
regex := "/docker/([[:alnum:]]{64})$"
172+
regex := "/docker[/-]([[:alnum:]]{64})(\\.scope)?$"
173173
re := regexp.MustCompilePOSIX(regex)
174174

175175
for scanner.Scan() {

0 commit comments

Comments
 (0)