Add support for "run in"

To support "exec" health checking, debugging and kubelet lifecycle events
@vmarmol indicated it had to match up pretty closely to the version of
docker you are running, maybe that's it?


On Fri, Aug 8, 2014 at 5:03 PM, Tim Hockin <notifications@github.com> wrote:

> In pkg/kubelet/docker.go:
>
> > @@ -63,6 +64,30 @@ func NewDockerPuller(client DockerInterface) DockerPuller {
> >  	}
> >  }
> >
> > +type dockerContainerCommandRunner struct{}
> > +
> > +func (d *dockerContainerCommandRunner) getRunInContainerCommand(containerID string, cmd []string) (*exec.Cmd, error) {
> > +	args := append([]string{"exec"}, cmd...)
> > +	command := exec.Command("/usr/sbin/nsinit", args...)
> > +	command.Dir = fmt.Sprintf("/var/lib/docker/execdriver/native/%s", containerID)
>
> Thanks, I am running as root :)
>
> Maybe I don't have the "good" nsinit? It never works for me, unless I run
> it under strace - weird.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/825/files#r16022498>
> .
>