Skip to content

Commit

Permalink
resolves #26 fix hanging during docker build with BuildKit
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Nov 12, 2023
1 parent b4f64ab commit cf7cb66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions containerd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ func (s *service) Create(ctx context.Context, request *taskAPI.CreateTaskRequest
return nil, err
}

if err = os.MkdirAll(path.Join(rootfs, "var", "run"), 0o755); err != nil {
return nil, err
}

// Workaround for 104-char limit of UNIX socket path
shortenedRootfsPath, err := filepath.Rel(wd, path.Join(rootfs))
if err != nil || len(shortenedRootfsPath) > len(rootfs) {
Expand Down Expand Up @@ -287,6 +283,10 @@ func (s *service) Start(ctx context.Context, request *taskAPI.StartRequest) (*ta
return nil, err
}

if err = os.MkdirAll(path.Dir(c.dnsSocketPath), 0o755); err != nil {
return nil, err
}

dnsSocket, err := net.ListenUnix("unix", &net.UnixAddr{Name: c.dnsSocketPath, Net: "unix"})
if err != nil {
return nil, err
Expand Down

0 comments on commit cf7cb66

Please sign in to comment.