fix: force IPv4 and add aggressive timeouts for APT
- Force IPv4 (IPv6 shows 33% packet loss) - Increase retries to 5 - Add 10s timeouts to fail fast and retry - Previous fix improved from 1630s to 78s but still hangs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ec3c279e11
commit
67b00b941e
|
|
@ -1,9 +1,12 @@
|
||||||
FROM python:3.12-slim
|
FROM python:3.12-slim
|
||||||
|
|
||||||
# Use German mirror for better connectivity and add retry logic
|
# Force IPv4 and use German mirror with aggressive retry/timeout settings
|
||||||
RUN echo "deb http://ftp.de.debian.org/debian bookworm main" > /etc/apt/sources.list && \
|
RUN echo "Acquire::ForceIPv4 \"true\";" > /etc/apt/apt.conf.d/99force-ipv4 && \
|
||||||
echo "deb http://ftp.de.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list && \
|
echo "Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \
|
||||||
echo "Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries
|
echo "Acquire::http::Timeout \"10\";" >> /etc/apt/apt.conf.d/80-retries && \
|
||||||
|
echo "Acquire::ftp::Timeout \"10\";" >> /etc/apt/apt.conf.d/80-retries && \
|
||||||
|
echo "deb http://ftp.de.debian.org/debian bookworm main" > /etc/apt/sources.list && \
|
||||||
|
echo "deb http://ftp.de.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list
|
||||||
|
|
||||||
# Install PostgreSQL client for psql (needed for startup.sh)
|
# Install PostgreSQL client for psql (needed for startup.sh)
|
||||||
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y postgresql-client && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user