Dockerfile 585 B

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