Dockerfile 409 B

12345678910111213141516171819
  1. FROM docker.io/alpine:3.17.1
  2. ARG OPENSSH_SERVER_PACKAGE_VERSION=9.1_p1-r1
  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"]