Fix build because of imports in package
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"github.com/docker/containerkit/osutils"
|
||||
"github.com/docker/containerd/sys"
|
||||
"github.com/docker/docker/pkg/term"
|
||||
)
|
||||
|
||||
@@ -63,7 +63,7 @@ func start(log *os.File) error {
|
||||
signals := make(chan os.Signal, 2048)
|
||||
signal.Notify(signals)
|
||||
// set the shim as the subreaper for all orphaned processes created by the container
|
||||
if err := osutils.SetSubreaper(1); err != nil {
|
||||
if err := sys.SetSubreaper(1); err != nil {
|
||||
return err
|
||||
}
|
||||
// open the exit pipe
|
||||
@@ -106,7 +106,7 @@ func start(log *os.File) error {
|
||||
case s := <-signals:
|
||||
switch s {
|
||||
case syscall.SIGCHLD:
|
||||
exits, _ := osutils.Reap(false)
|
||||
exits, _ := sys.Reap(false)
|
||||
for _, e := range exits {
|
||||
// check to see if runtime is one of the processes that has exited
|
||||
if e.Pid == p.pid() {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/containerkit"
|
||||
"github.com/docker/containerd"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
@@ -35,7 +35,7 @@ type processOpts struct {
|
||||
root string
|
||||
noPivotRoot bool
|
||||
checkpoint string
|
||||
c *containerkit.Container
|
||||
c *containerd.Container
|
||||
cmd *exec.Cmd
|
||||
exec bool
|
||||
spec specs.Process
|
||||
|
||||
16
shim/shim.go
16
shim/shim.go
@@ -12,9 +12,9 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/docker/containerkit"
|
||||
"github.com/docker/containerkit/monitor"
|
||||
"github.com/docker/containerkit/oci"
|
||||
"github.com/docker/containerd"
|
||||
"github.com/docker/containerd/monitor"
|
||||
"github.com/docker/containerd/oci"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
)
|
||||
|
||||
@@ -204,7 +204,7 @@ func (s *Shim) UnmarshalJSON(b []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Shim) Create(c *containerkit.Container) (containerkit.ProcessDelegate, error) {
|
||||
func (s *Shim) Create(c *containerd.Container) (containerd.ProcessDelegate, error) {
|
||||
s.bundle = c.Path()
|
||||
var (
|
||||
root = filepath.Join(s.root, "init")
|
||||
@@ -247,7 +247,7 @@ func (s *Shim) Create(c *containerkit.Container) (containerkit.ProcessDelegate,
|
||||
return p, err
|
||||
}
|
||||
|
||||
func (s *Shim) Start(c *containerkit.Container) error {
|
||||
func (s *Shim) Start(c *containerd.Container) error {
|
||||
p, err := s.getContainerInit()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -284,14 +284,14 @@ func (s *Shim) Start(c *containerkit.Container) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Shim) Delete(c *containerkit.Container) error {
|
||||
func (s *Shim) Delete(c *containerd.Container) error {
|
||||
if err := s.runtime.Delete(c); err != nil {
|
||||
return err
|
||||
}
|
||||
return os.RemoveAll(s.root)
|
||||
}
|
||||
|
||||
func (s *Shim) Exec(c *containerkit.Container, p *containerkit.Process) (containerkit.ProcessDelegate, error) {
|
||||
func (s *Shim) Exec(c *containerd.Container, p *containerd.Process) (containerd.ProcessDelegate, error) {
|
||||
root, err := ioutil.TempDir(s.root, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -325,7 +325,7 @@ func (s *Shim) Exec(c *containerkit.Container, p *containerkit.Process) (contain
|
||||
return sp, nil
|
||||
}
|
||||
|
||||
func (s *Shim) Load(id string) (containerkit.ProcessDelegate, error) {
|
||||
func (s *Shim) Load(id string) (containerd.ProcessDelegate, error) {
|
||||
return s.getContainerInit()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user