# Search exported Railway logs for any -weight: 500;">apt timeouts
grep -E "(-weight: 500;">apt-get|-weight: 500;">apt |dpkg)" railway-build-logs-june.txt | \ grep -E "(timeout|could not|failed|Unable to fetch)" | \ sort | uniq -c | sort -rn
# Search exported Railway logs for any -weight: 500;">apt timeouts
grep -E "(-weight: 500;">apt-get|-weight: 500;">apt |dpkg)" railway-build-logs-june.txt | \ grep -E "(timeout|could not|failed|Unable to fetch)" | \ sort | uniq -c | sort -rn
# Search exported Railway logs for any -weight: 500;">apt timeouts
grep -E "(-weight: 500;">apt-get|-weight: 500;">apt |dpkg)" railway-build-logs-june.txt | \ grep -E "(timeout|could not|failed|Unable to fetch)" | \ sort | uniq -c | sort -rn
# Calculate average time for "RUN -weight: 500;">apt-get -weight: 500;">update" step per week
# (data exported from Railway dashboard > Deployments > Build Logs)
awk '/-weight: 500;">apt-get -weight: 500;">update/{-weight: 500;">start=$1} /done/{if(-weight: 500;">start) print $1--weight: 500;">start; -weight: 500;">start=""}' \ railway-build-steps-june.txt | \ awk '{sum+=$1; n++} END {print "Average:", sum/n, "seconds"}'
# Output: Average: 23.4 seconds
# Calculate average time for "RUN -weight: 500;">apt-get -weight: 500;">update" step per week
# (data exported from Railway dashboard > Deployments > Build Logs)
awk '/-weight: 500;">apt-get -weight: 500;">update/{-weight: 500;">start=$1} /done/{if(-weight: 500;">start) print $1--weight: 500;">start; -weight: 500;">start=""}' \ railway-build-steps-june.txt | \ awk '{sum+=$1; n++} END {print "Average:", sum/n, "seconds"}'
# Output: Average: 23.4 seconds
# Calculate average time for "RUN -weight: 500;">apt-get -weight: 500;">update" step per week
# (data exported from Railway dashboard > Deployments > Build Logs)
awk '/-weight: 500;">apt-get -weight: 500;">update/{-weight: 500;">start=$1} /done/{if(-weight: 500;">start) print $1--weight: 500;">start; -weight: 500;">start=""}' \ railway-build-steps-june.txt | \ awk '{sum+=$1; n++} END {print "Average:", sum/n, "seconds"}'
# Output: Average: 23.4 seconds
# Image 1: main API
FROM node:20-bookworm-slim
# "bookworm" is Debian, not Ubuntu — OK, doesn't touch Canonical mirrors # Image 2: processing worker
FROM python:3.11-slim
# Also Debian base — OK # Image 3: internal admin tool
FROM ubuntu:22.04
# HERE it is. Direct Ubuntu, APT points to archive.ubuntu.com # Image 4: base for DB migration scripts
FROM ubuntu:20.04
# Another one. Old LTS I never updated because "it works"
# Image 1: main API
FROM node:20-bookworm-slim
# "bookworm" is Debian, not Ubuntu — OK, doesn't touch Canonical mirrors # Image 2: processing worker
FROM python:3.11-slim
# Also Debian base — OK # Image 3: internal admin tool
FROM ubuntu:22.04
# HERE it is. Direct Ubuntu, APT points to archive.ubuntu.com # Image 4: base for DB migration scripts
FROM ubuntu:20.04
# Another one. Old LTS I never updated because "it works"
# Image 1: main API
FROM node:20-bookworm-slim
# "bookworm" is Debian, not Ubuntu — OK, doesn't touch Canonical mirrors # Image 2: processing worker
FROM python:3.11-slim
# Also Debian base — OK # Image 3: internal admin tool
FROM ubuntu:22.04
# HERE it is. Direct Ubuntu, APT points to archive.ubuntu.com # Image 4: base for DB migration scripts
FROM ubuntu:20.04
# Another one. Old LTS I never updated because "it works"
# Search my private Railway registry for images that inherit from my ubuntu base
-weight: 500;">docker image inspect $(-weight: 500;">docker images -q) --format '{{.RepoTags}} {{.Config.Image}}' \ 2>/dev/null | grep -i "juanchi-base"
# Output: 3 images using juanchi-base:latest as FROM
# Search my private Railway registry for images that inherit from my ubuntu base
-weight: 500;">docker image inspect $(-weight: 500;">docker images -q) --format '{{.RepoTags}} {{.Config.Image}}' \ 2>/dev/null | grep -i "juanchi-base"
# Output: 3 images using juanchi-base:latest as FROM
# Search my private Railway registry for images that inherit from my ubuntu base
-weight: 500;">docker image inspect $(-weight: 500;">docker images -q) --format '{{.RepoTags}} {{.Config.Image}}' \ 2>/dev/null | grep -i "juanchi-base"
# Output: 3 images using juanchi-base:latest as FROM
# Inside a test container with ubuntu:22.04
# Add a fake /etc/hosts entry to simulate downed mirrors
-weight: 500;">docker run --add-host=archive.ubuntu.com:127.0.0.1 \ --add-host=security.ubuntu.com:127.0.0.1 \ ubuntu:22.04 \ bash -c "time -weight: 500;">apt-get -weight: 500;">update 2>&1 | tail -5"
# Inside a test container with ubuntu:22.04
# Add a fake /etc/hosts entry to simulate downed mirrors
-weight: 500;">docker run --add-host=archive.ubuntu.com:127.0.0.1 \ --add-host=security.ubuntu.com:127.0.0.1 \ ubuntu:22.04 \ bash -c "time -weight: 500;">apt-get -weight: 500;">update 2>&1 | tail -5"
# Inside a test container with ubuntu:22.04
# Add a fake /etc/hosts entry to simulate downed mirrors
-weight: 500;">docker run --add-host=archive.ubuntu.com:127.0.0.1 \ --add-host=security.ubuntu.com:127.0.0.1 \ ubuntu:22.04 \ bash -c "time -weight: 500;">apt-get -weight: 500;">update 2>&1 | tail -5"
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease Could not connect to 127.0.0.1:80 (127.0.0.1). - connect (111: Connection refused)
Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Could not connect to 127.0.0.1:80 (127.0.0.1). - connect (111: Connection refused)
Reading package lists... Done
W: Some index files failed to download...
real 0m18.432s
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease Could not connect to 127.0.0.1:80 (127.0.0.1). - connect (111: Connection refused)
Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Could not connect to 127.0.0.1:80 (127.0.0.1). - connect (111: Connection refused)
Reading package lists... Done
W: Some index files failed to download...
real 0m18.432s
Err:1 http://archive.ubuntu.com/ubuntu jammy InRelease Could not connect to 127.0.0.1:80 (127.0.0.1). - connect (111: Connection refused)
Err:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Could not connect to 127.0.0.1:80 (127.0.0.1). - connect (111: Connection refused)
Reading package lists... Done
W: Some index files failed to download...
real 0m18.432s
# This fails hard on degraded mirrors:
RUN -weight: 500;">apt-get -weight: 500;">update && -weight: 500;">apt-get -weight: 500;">install -y -weight: 500;">curl # This at least tries to keep going:
RUN -weight: 500;">apt-get -weight: 500;">update --fix-missing && -weight: 500;">apt-get -weight: 500;">install -y --no--weight: 500;">install-recommends -weight: 500;">curl # What you actually want if the mirror might be down:
RUN -weight: 500;">apt-get -weight: 500;">update --fix-missing || true && \ -weight: 500;">apt-get -weight: 500;">install -y --no--weight: 500;">install-recommends -weight: 500;">curl 2>/dev/null || \ echo "WARNING: -weight: 500;">apt degraded, continuing without optional packages"
# This fails hard on degraded mirrors:
RUN -weight: 500;">apt-get -weight: 500;">update && -weight: 500;">apt-get -weight: 500;">install -y -weight: 500;">curl # This at least tries to keep going:
RUN -weight: 500;">apt-get -weight: 500;">update --fix-missing && -weight: 500;">apt-get -weight: 500;">install -y --no--weight: 500;">install-recommends -weight: 500;">curl # What you actually want if the mirror might be down:
RUN -weight: 500;">apt-get -weight: 500;">update --fix-missing || true && \ -weight: 500;">apt-get -weight: 500;">install -y --no--weight: 500;">install-recommends -weight: 500;">curl 2>/dev/null || \ echo "WARNING: -weight: 500;">apt degraded, continuing without optional packages"
# This fails hard on degraded mirrors:
RUN -weight: 500;">apt-get -weight: 500;">update && -weight: 500;">apt-get -weight: 500;">install -y -weight: 500;">curl # This at least tries to keep going:
RUN -weight: 500;">apt-get -weight: 500;">update --fix-missing && -weight: 500;">apt-get -weight: 500;">install -y --no--weight: 500;">install-recommends -weight: 500;">curl # What you actually want if the mirror might be down:
RUN -weight: 500;">apt-get -weight: 500;">update --fix-missing || true && \ -weight: 500;">apt-get -weight: 500;">install -y --no--weight: 500;">install-recommends -weight: 500;">curl 2>/dev/null || \ echo "WARNING: -weight: 500;">apt degraded, continuing without optional packages"