Dockerfile 697 B

1234567891011121314151617181920212223242526
  1. FROM docker.io/alpine:3.19.0
  2. # https://git.alpinelinux.org/aports/log/main/rsync?h=3.19-stable
  3. ARG RSYNC_PACKAGE_VERSION=3.2.7-r4
  4. # https://www.openssh.com/releasenotes.html
  5. # https://git.alpinelinux.org/aports/log/main/openssh?h=3.19-stable
  6. ARG OPENSSH_SERVER_PACKAGE_VERSION=9.6_p1-r0
  7. RUN apk add --no-cache \
  8. openssh-server=$OPENSSH_SERVER_PACKAGE_VERSION \
  9. rrsync=$RSYNC_PACKAGE_VERSION \
  10. rsync=$RSYNC_PACKAGE_VERSION
  11. ENV SSHD_HOST_KEYS_DIR /etc/ssh/host_keys
  12. VOLUME $SSHD_HOST_KEYS_DIR
  13. COPY sshd_config /etc/ssh/sshd_config
  14. # comma-separated list of usernames
  15. ENV USERS ""
  16. EXPOSE 22/tcp
  17. COPY entrypoint.sh /
  18. ENTRYPOINT ["/entrypoint.sh"]
  19. CMD ["/usr/sbin/sshd", "-D", "-e"]