mirror of https://github.com/docker/cli.git
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:
parent
fdb0ef7be0
commit
5de2d9e8a9
|
@ -1,10 +1,9 @@
|
||||||
FROM docker:test-dind
|
FROM docker:test-dind
|
||||||
RUN apk --no-cache add shadow openssh-server && \
|
RUN apk --no-cache add shadow openssh-server && \
|
||||||
groupadd -f docker && \
|
groupadd -f docker && \
|
||||||
useradd -m penguin && \
|
useradd -m --shell /bin/sh penguin && \
|
||||||
usermod -aG docker penguin && \
|
usermod -aG docker penguin && \
|
||||||
usermod -p $(head -c32 /dev/urandom | base64) penguin && \
|
usermod -p $(head -c32 /dev/urandom | base64) penguin && \
|
||||||
chsh -s /bin/sh penguin && \
|
|
||||||
ssh-keygen -A
|
ssh-keygen -A
|
||||||
# workaround: ssh session excludes /usr/local/bin from $PATH
|
# workaround: ssh session excludes /usr/local/bin from $PATH
|
||||||
RUN ln -s /usr/local/bin/docker /usr/bin/docker
|
RUN ln -s /usr/local/bin/docker /usr/bin/docker
|
||||||
|
|
Loading…
Reference in New Issue