mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 23:38:24 +00:00
Import nsenter in docker.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
This commit is contained in:
+2
-3
@@ -18,8 +18,8 @@ import (
|
||||
|
||||
type ExecConfig struct {
|
||||
ProcessConfig execdriver.ProcessConfig
|
||||
StreamConfig StreamConfig
|
||||
OpenStdin bool
|
||||
StreamConfig
|
||||
OpenStdin bool
|
||||
}
|
||||
|
||||
func (d *Daemon) ContainerExec(job *engine.Job) engine.Status {
|
||||
@@ -92,7 +92,6 @@ func (d *Daemon) ContainerExec(job *engine.Job) engine.Status {
|
||||
attachErr = d.Attach(&execConfig.StreamConfig, config.AttachStdin, false, config.Tty, cStdin, cStdinCloser, cStdout, cStderr)
|
||||
}()
|
||||
|
||||
log.Debugf("Exec Config is %+v\n", execConfig)
|
||||
go func() {
|
||||
err := container.Exec(execConfig)
|
||||
if err != nil {
|
||||
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/docker/libcontainer/cgroups/systemd"
|
||||
consolepkg "github.com/docker/libcontainer/console"
|
||||
"github.com/docker/libcontainer/namespaces"
|
||||
_ "github.com/docker/libcontainer/namespaces/nsenter"
|
||||
"github.com/docker/libcontainer/system"
|
||||
)
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ func nsenterExec() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(vishh): Add support for running in priviledged mode and running as a different user.
|
||||
func (d *driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessConfig, pipes *execdriver.Pipes, startCallback execdriver.StartCallback) (int, error) {
|
||||
active := d.activeContainers[c.ID]
|
||||
if active == nil {
|
||||
|
||||
Reference in New Issue
Block a user