Skip to content

Commit

Permalink
Merge pull request #4778 from tonistiigi/otel-mount-source-check
Browse files Browse the repository at this point in the history
oci: make mounting oci socket optional
  • Loading branch information
tonistiigi authored Mar 18, 2024
2 parents eb41916 + 33b347a commit 6e48182
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 6e48182

Please sign in to comment.