Skip to content

Commit b3b09d7

Browse files
Retrieve container ID for docker 1.10
1 parent a1a1130 commit b3b09d7

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
@@ -171,7 +171,7 @@ func GetCurrentContainerID() string {
171171
for scanner.Scan() {
172172
_, lines, err := bufio.ScanLines([]byte(scanner.Text()), true)
173173
if err == nil {
174-
re := regexp.MustCompilePOSIX("/docker-([[:alnum:]]{64}).scope$")
174+
re := regexp.MustCompilePOSIX("/docker/([[:alnum:]]{64})$")
175175
if re.MatchString(string(lines)) {
176176
submatches := re.FindStringSubmatch(string(lines))
177177
containerID := submatches[1]

0 commit comments

Comments
 (0)