e2e Use useradd's --shell option
... in preference to `chsh`, since in recent alpine 3.9.2 images that can fail
with:
Password: chsh: PAM: Authentication token manipulation error
Which seems to relate to the use of `!` as the password for `root` in `/etc/shadow`gq
Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
3
e2e/testdata/Dockerfile.connhelper-ssh
vendored
3
e2e/testdata/Dockerfile.connhelper-ssh
vendored
@ -1,10 +1,9 @@
|
||||
FROM docker:test-dind
|
||||
RUN apk --no-cache add shadow openssh-server && \
|
||||
groupadd -f docker && \
|
||||
useradd -m penguin && \
|
||||
useradd -m --shell /bin/sh penguin && \
|
||||
usermod -aG docker penguin && \
|
||||
usermod -p $(head -c32 /dev/urandom | base64) penguin && \
|
||||
chsh -s /bin/sh penguin && \
|
||||
ssh-keygen -A
|
||||
# workaround: ssh session excludes /usr/local/bin from $PATH
|
||||
RUN ln -s /usr/local/bin/docker /usr/bin/docker
|
||||
|
||||
Reference in New Issue
Block a user