github.com/AliyunContainerService/cli@v0.0.0-20181009023821-814ced4b30d0/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 -m penguin && \
     5    usermod -aG docker penguin && \
     6    usermod -p $(head -c32 /dev/urandom | base64) penguin && \
     7    chsh -s /bin/sh penguin && \
     8    ssh-keygen -A
     9  # workaround: ssh session excludes /usr/local/bin from $PATH
    10  RUN  ln -s /usr/local/bin/docker /usr/bin/docker
    11  COPY ./connhelper-ssh/entrypoint.sh /
    12  EXPOSE 22
    13  ENTRYPOINT ["/entrypoint.sh"]
    14  # usage: docker run --privileged -e TEST_CONNHELPER_SSH_ID_RSA_PUB=$(cat ~/.ssh/id_rsa.pub) -p 22 $THIS_IMAGE