Dockerfile 498 B

1234567891011121314151617181920212223
  1. FROM ubuntu:16.04
  2. # Install Python
  3. RUN apt-get update && \
  4. apt-get -y install python python-pip
  5. # Install AWS CLI and schedule package
  6. RUN pip install awscli schedule
  7. # Add scripts
  8. ADD backup.sh /app/backup.sh
  9. ADD run.py /app/run.py
  10. RUN chmod +x /app/backup.sh
  11. RUN chmod +x /app/run.py
  12. # Default environment variables
  13. ENV BACKUP_INTERVAL 1
  14. ENV BACKUP_TIME 2:00
  15. ENV DATE_FORMAT %Y%m%d-%H%M%S
  16. ENV FILE_PREFIX backup-
  17. # Run the schedule command on startup
  18. CMD ["python", "-u", "/app/run.py"]