Skip to content

Commit 8284add

Browse files
committed
Strip PGDG apt source by content, not by filename
Previous rm -f targeted pgdg.list and postgresql.list explicitly, but the catmaid/catmaid-standalone image stores the PGDG source under a different filename (build log still shows apt querying focal-pgdg). Switch to a find + sed -i that scans every .list and .sources file under /etc/apt and strips any line referencing apt.postgresql.org or pgdg. Filename-agnostic, idempotent, and also handles deb822 .sources files for future upstream rebases.
1 parent d9c1498 commit 8284add

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎Dockerfile‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,17 @@ RUN chmod +x /opt/VFB/*.sh
3636
# Development Group (PGDG) apt repo, but PGDG retired focal-pgdg when
3737
# Ubuntu 20.04 hit standard EOL — its Release file is gone, so apt-get
3838
# update aborts. Postgres is already installed in the base image, so we
39-
# just disable the PGDG source before running update.
39+
# strip any apt source line referencing PGDG (filename varies across
40+
# upstream builds — pgdg.list, pgdg-postgresql.list, etc.) before running
41+
# update.
4042
#
4143
# focal is past standard support; we apply what patches still flow into
4244
# focal-updates/focal-security with apt-get upgrade. ESM-only CVEs (e.g.
4345
# many libssl, openssh, glibc fixes after April 2025) require an Ubuntu
4446
# Pro token which we don't ship; the longer-term fix is to rebase
4547
# catmaid-standalone on jammy or noble.
46-
RUN rm -f /etc/apt/sources.list.d/pgdg.list /etc/apt/sources.list.d/postgresql.list \
48+
RUN find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) \
49+
-exec sed -i -E '/apt\.postgresql\.org|pgdg/d' {} + \
4750
&& apt-get update \
4851
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
4952
&& apt-get install -y r-base \

0 commit comments

Comments
 (0)