Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. diff --git a/runtime/v1/linux/runtime.go b/runtime/v1/linux/runtime.go
  2. index 6bda8f9a..699032b7 100644
  3. --- a/runtime/v1/linux/runtime.go
  4. +++ b/runtime/v1/linux/runtime.go
  5. @@ -41,7 +41,7 @@ import (
  6. "github.com/containerd/containerd/plugin"
  7. "github.com/containerd/containerd/runtime"
  8. "github.com/containerd/containerd/runtime/linux/runctypes"
  9. - "github.com/containerd/containerd/runtime/v1"
  10. + v1 "github.com/containerd/containerd/runtime/v1"
  11. "github.com/containerd/containerd/runtime/v1/linux/proc"
  12. shim "github.com/containerd/containerd/runtime/v1/shim/v1"
  13. runc "github.com/containerd/go-runc"
  14. diff --git a/runtime/v1/shim/service.go b/runtime/v1/shim/service.go
  15. index 6e87f052..1269c042 100644
  16. --- a/runtime/v1/shim/service.go
  17. +++ b/runtime/v1/shim/service.go
  18. @@ -25,6 +25,7 @@ import (
  19. "io/ioutil"
  20. "os"
  21. "path/filepath"
  22. + sysruntime "runtime"
  23. "sync"
  24.  
  25. "github.com/containerd/console"
  26. @@ -123,7 +124,6 @@ func (s *Service) Create(ctx context.Context, r *shimapi.CreateTaskRequest) (_ *
  27. Options: m.Options,
  28. })
  29. }
  30. -
  31. rootfs := ""
  32. if len(mounts) > 0 {
  33. rootfs = filepath.Join(r.Bundle, "rootfs")
  34. @@ -659,7 +659,11 @@ func newInit(ctx context.Context, path, workDir, runtimeRoot, namespace, criu st
  35. })
  36. p.Bundle = r.Bundle
  37. p.Platform = platform
  38. - p.Rootfs = rootfs
  39. + if sysruntime.GOOS == "darwin" {
  40. + p.Rootfs = filepath.Join(path, "rootfs")
  41. + } else {
  42. + p.Rootfs = rootfs
  43. + }
  44. p.WorkDir = workDir
  45. p.IoUID = int(options.IoUid)
  46. p.IoGID = int(options.IoGid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement