Dockerfile 519 B

123456789101112131415161718192021
  1. FROM docker.io/alpine:3.18.4
  2. # https://www.openssh.com/releasenotes.html
  3. # https://git.alpinelinux.org/aports/log/main/openssh?h=3.18-stable
  4. ARG OPENSSH_SERVER_PACKAGE_VERSION=9.3_p2-r0
  5. RUN apk add --no-cache openssh-server=$OPENSSH_SERVER_PACKAGE_VERSION
  6. ENV SSHD_HOST_KEYS_DIR /etc/ssh/host_keys
  7. VOLUME $SSHD_HOST_KEYS_DIR
  8. COPY sshd_config /etc/ssh/sshd_config
  9. # comma-separated list of usernames
  10. ENV USERS ""
  11. EXPOSE 22/tcp
  12. COPY entrypoint.sh /
  13. ENTRYPOINT ["/entrypoint.sh"]
  14. CMD ["/usr/sbin/sshd", "-D", "-e"]