e2e: avoid usermod -p by using useradd's --password option
Signed-off-by: Ian Campbell <ijc@docker.com> (cherry picked from commit0b0c57871a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit:78d52ec5d4Component: cli
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
e0218c5780
commit
35a6ca7054
+1
-2
@@ -1,9 +1,8 @@
|
||||
FROM docker:test-dind
|
||||
RUN apk --no-cache add shadow openssh-server && \
|
||||
groupadd -f docker && \
|
||||
useradd --create-home --shell /bin/sh penguin && \
|
||||
useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin && \
|
||||
usermod -aG docker penguin && \
|
||||
usermod -p $(head -c32 /dev/urandom | base64) 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