Dockerfile 538 B

123456789101112131415161718192021
  1. FROM python:3.7.0-alpine3.8
  2. # TODO remove git from image
  3. RUN apk add --no-cache git
  4. RUN adduser -S ftp-sink
  5. USER ftp-sink
  6. ENV PATH "${PATH}:/home/ftp-sink/.local/bin"
  7. VOLUME /sink
  8. ENV FTP_USERNAME user
  9. ENV FTP_PASSWORD_SHA256 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b
  10. ENV FTP_CONTROL_PORT 2121
  11. ENV FTP_PASSIVE_PORT 62121
  12. EXPOSE $FTP_CONTROL_PORT $FTP_PASSIVE_PORT
  13. COPY . /pyftpd-sink
  14. RUN pip install --user /pyftpd-sink
  15. # TODO set masquerade address for passive mode
  16. CMD ["pyftpd-sink", "--root-dir", "/sink"]