github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/e2e/testdata/Dockerfile.connhelper-ssh (about)

     1  FROM docker:test-dind
     2  RUN apk --no-cache add shadow openssh-server && \
     3    groupadd -f docker && \
     4    useradd --create-home --shell /bin/sh --password $(head -c32 /dev/urandom | base64) penguin && \
     5    usermod -aG docker penguin && \
     6    ssh-keygen -A
     7  # workaround: ssh session excludes /usr/local/bin from $PATH
     8  RUN  ln -s /usr/local/bin/docker /usr/bin/docker
     9  COPY ./connhelper-ssh/entrypoint.sh /
    10  EXPOSE 22
    11  ENTRYPOINT ["/entrypoint.sh"]
    12  # usage: docker run --privileged -e TEST_CONNHELPER_SSH_ID_RSA_PUB=$(cat ~/.ssh/id_rsa.pub) -p 22 $THIS_IMAGE