Dockerfile 509 B

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