Backup was mostly working but failing at the end due to Python calls. CHANGES: - Made manifest generation work without Python (bash JSON) - Made check verification recording work without Python - All Python calls now wrapped in 'command -v python3' checks - Falls back to bash sed for JSON updates RESULT: Backup completes successfully without Python - Database dump: SUCCESS (24K) - Minimal manifest: SUCCESS (bash-generated JSON) - Restic snapshot: SUCCESS - Repository verification: SUCCESS - Script exit: SUCCESS (no more Python errors) Backups now work in offline/corporate proxy environments with zero downloads during Docker build.
26 lines
1.0 KiB
Docker
26 lines
1.0 KiB
Docker
# Backup sidecar image: mysql:8.4 base (mysqldump already included) plus
|
|
# offline-packaged restic for deduped, encrypted backups.
|
|
#
|
|
# OFFLINE BUILD: No package downloads during build to avoid corporate proxy SSL issues.
|
|
# - mysqldump: included in mysql:8.4 base image (version-matched)
|
|
# - restic: pre-downloaded binary baked into repo at scripts/backup/offline-packages/
|
|
# - NO Python/alembic: simplified backup without manifest generation
|
|
#
|
|
# This works behind Zscaler/corporate proxies because nothing downloads during build.
|
|
FROM mysql:8.4
|
|
|
|
# Copy pre-downloaded restic binary (offline package - baked into repo)
|
|
COPY scripts/backup/offline-packages/restic_0.17.3_linux_amd64.bz2 /tmp/restic.bz2
|
|
|
|
# Install restic from offline package (no downloads, no SSL issues)
|
|
RUN bunzip2 /tmp/restic.bz2 \
|
|
&& install -m 0755 /tmp/restic /usr/local/bin/restic \
|
|
&& rm -f /tmp/restic \
|
|
&& restic version
|
|
|
|
# Copy backup scripts into image
|
|
COPY scripts/backup/*.sh /opt/backup/
|
|
RUN chmod +x /opt/backup/*.sh
|
|
|
|
ENTRYPOINT ["/opt/backup/backup.sh"]
|