run a normal (rather than login) shell in containers

That way PATH is preserved.

Fixes #2550.
This commit is contained in:
Matthias Radestock
2017-08-01 08:53:56 +01:00
parent 2c63206525
commit 8935d434c5

View File

@@ -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 {