Initial windows runtime work
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package execution
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
@@ -209,11 +208,7 @@ func (s *Service) Exec(ctx context.Context, r *api.ExecRequest) (*api.ExecRespon
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
l, ok := c.(containerd.LinuxContainer)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("cannot exec into a non linux container")
|
||||
}
|
||||
process, err := l.Exec(ctx, containerd.ExecOpts{
|
||||
process, err := c.Exec(ctx, containerd.ExecOpts{
|
||||
Spec: r.Spec.Value,
|
||||
IO: containerd.IO{
|
||||
Stdin: r.Stdin,
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package rootfs
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
rootfsapi "github.com/containerd/containerd/api/services/rootfs"
|
||||
containerd_v1_types "github.com/containerd/containerd/api/types/mount"
|
||||
@@ -104,7 +102,7 @@ func (mounter) Mount(dir string, mounts ...containerd.Mount) error {
|
||||
}
|
||||
|
||||
func (mounter) Unmount(dir string) error {
|
||||
return syscall.Unmount(dir, 0)
|
||||
return containerd.Unmount(dir, 0)
|
||||
}
|
||||
|
||||
func emptyResolver(digest.Digest) digest.Digest {
|
||||
|
||||
Reference in New Issue
Block a user