Dockerfile 397 B

12345678910111213141516171819
  1. FROM alpine:3.14.0
  2. ARG OPENSSH_SERVER_PACKAGE_VERSION=8.4_p1-r3
  3. RUN apk add --no-cache openssh-server=$OPENSSH_SERVER_PACKAGE_VERSION
  4. ENV SSHD_HOST_KEYS_DIR /etc/ssh/host_keys
  5. VOLUME $SSHD_HOST_KEYS_DIR
  6. COPY sshd_config /etc/ssh/sshd_config
  7. # comma-separated list of usernames
  8. ENV USERS ""
  9. EXPOSE 22/tcp
  10. COPY entrypoint.sh /
  11. ENTRYPOINT ["/entrypoint.sh"]
  12. CMD ["/usr/sbin/sshd", "-D", "-e"]