Dockerfile 591 B

123456789101112131415161718192021222324
  1. FROM alpine
  2. MAINTAINER longjin <[email protected]>
  3. # tzdata for time syncing
  4. # bash for entrypoint script
  5. RUN apk add --no-cache rsync bash tzdata
  6. # Create entrypoint script
  7. ADD docker-entrypoint.sh /
  8. RUN chmod +x /docker-entrypoint.sh
  9. RUN mkdir -p /docker-entrypoint.d
  10. # SSH Server configuration file
  11. ADD /rsyncd.tpl.conf /
  12. # Default environment variables
  13. ENV TZ="Asia/Shanghai" \
  14. LANG="C.UTF-8"
  15. EXPOSE 873
  16. ENTRYPOINT [ "/docker-entrypoint.sh" ]
  17. # RUN rsync in no daemon and expose errors to stdout
  18. CMD [ "/usr/bin/rsync", "--no-detach", "--daemon", "--log-file=/dev/stdout" ]