Dockerfile 697 B

1234567891011121314151617181920
  1. FROM alpine:latest
  2. RUN apk add --no-cache wget tar openssh rsync
  3. # Download gdrive
  4. RUN wget https://github.com/glotlabs/gdrive/releases/download/3.9.0/gdrive_linux-x64.tar.gz
  5. RUN tar xzvf gdrive_linux-x64.tar.gz
  6. RUN mv gdrive /usr/local/bin
  7. RUN chmod a+rx /usr/local/bin/gdrive
  8. # Prepare scripts
  9. COPY ./backup-gdrive.sh /usr/local/bin
  10. COPY ./download-gdrive.sh /usr/local/bin
  11. COPY ./backup.sh /usr/local/bin
  12. RUN chmod a+rx /usr/local/bin/backup-gdrive.sh /usr/local/bin/download-gdrive.sh /usr/local/bin/backup.sh
  13. # gdrive looks for credentials in this folder. Allow user to mount it.
  14. RUN mkdir /root/.config
  15. VOLUME "/root/.config/gdrive3"
  16. ENTRYPOINT ["sh", "/usr/local/bin/backup-gdrive.sh"]