From 8935d434c58d3ea3b3d86fa01e8b4be7d2d05858 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 1 Aug 2017 08:53:56 +0100 Subject: [PATCH] run a normal (rather than login) shell in containers That way PATH is preserved. Fixes #2550. --- probe/docker/controls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/probe/docker/controls.go b/probe/docker/controls.go index 88b775e61..f2eb51e6e 100644 --- a/probe/docker/controls.go +++ b/probe/docker/controls.go @@ -112,7 +112,7 @@ func (r *registry) execContainer(containerID string, req xfer.Request) xfer.Resp AttachStdout: true, AttachStderr: true, Tty: true, - Cmd: []string{"/bin/sh", "-l", "-c", "TERM=xterm exec $( (type getent > /dev/null 2>&1 && getent passwd root | cut -d: -f7 2>/dev/null) || echo /bin/sh)"}, + Cmd: []string{"/bin/sh", "-c", "TERM=xterm exec $( (type getent > /dev/null 2>&1 && getent passwd root | cut -d: -f7 2>/dev/null) || echo /bin/sh)"}, Container: containerID, }) if err != nil {