Enable HostSpecific option in runtime-tools generator.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2018-01-03 19:01:01 +00:00
parent 750115c812
commit 31bc964195
5 changed files with 13 additions and 7 deletions

View File

@@ -26,7 +26,6 @@ import (
containerdio "github.com/containerd/containerd/cio"
"github.com/containerd/containerd/errdefs"
"github.com/golang/glog"
"github.com/opencontainers/runtime-tools/generate"
"golang.org/x/net/context"
"golang.org/x/sys/unix"
"k8s.io/client-go/tools/remotecommand"
@@ -100,7 +99,7 @@ func (c *criContainerdService) execInContainer(ctx context.Context, id string, o
return nil, fmt.Errorf("failed to load task: %v", err)
}
if opts.tty {
g := generate.NewFromSpec(spec)
g := newSpecGenerator(spec)
g.AddProcessEnv("TERM", "xterm")
spec = g.Spec()
}