FROM nanyangzesi/tgdrive:latest RUN apk update && apk add --no-cache \ curl \ rclone \ dcron \ davfs2 \ ca-certificates \ python3 \ py3-pip \ tar \ bash \ rsync \ coreutils \ findutils RUN python3 -m venv /app/venv && \ /app/venv/bin/pip install --no-cache-dir webdavclient3 WORKDIR /app RUN mkdir -p /app/db RUN mkdir -p /app/data RUN mkdir -p /app/backup RUN mkdir -p /app/logs RUN mkdir -p /app/config RUN chmod 777 /app/db RUN chmod 777 /app/data RUN chmod 777 /app/backup RUN chmod 777 /app/logs RUN chmod 777 /app/config COPY sync-script.sh /app/ RUN chmod +x /app/sync-script.sh COPY entrypoint.sh /app/ RUN chmod +x /app/entrypoint.sh EXPOSE 8085 ENV WEBDAV_URL="" ENV WEBDAV_USERNAME="" ENV WEBDAV_PASSWORD="" ENV SYNC_INTERVAL="60" ENV PATH="/app/venv/bin:$PATH" ENV REMOTE_BACKUP_DIR="tgdrive_backup" ENV BACKUP_FILENAME="tgdrive_db_backup.tar.gz" ENV DB_PATH="/app/db" ENV BACKUP_PATH="/app/backup" ENTRYPOINT ["/app/entrypoint.sh"]