Skip to content

Commit

Permalink
oci: make mounting oci socket optional
Browse files Browse the repository at this point in the history
The source path changed in v0.13 and there are reports
that new path can cause error on starting a container. While
this is investigated, check for missing path and make
mounting optional like it was in v0.12.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 33b347a)
  • Loading branch information
tonistiigi committed Mar 18, 2024
1 parent 9e593c0 commit 0aff323
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions executor/oci/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package oci

import (
"context"
"os"
"path"
"path/filepath"
"runtime"
Expand Down Expand Up @@ -197,8 +198,11 @@ func GenerateSpec(ctx context.Context, meta executor.Meta, mounts []executor.Mou
}

if tracingSocket != "" {
if mount := getTracingSocketMount(tracingSocket); mount != nil {
s.Mounts = append(s.Mounts, *mount)
// moby/buildkit#4764
if _, err := os.Stat(tracingSocket); err == nil {
if mount := getTracingSocketMount(tracingSocket); mount != nil {
s.Mounts = append(s.Mounts, *mount)
}
}
}

Expand Down

0 comments on commit 0aff323

Please sign in to comment.