[Dockerfile] remove the apt mirror; it broke the build

The mirror now redirects to HTTPS,
and `ubuntu:22.04` has no CA certificates before its first `apt install`,
so on amd64 every source was ignored and installing packages failed:

    Ign:2 https://ubuntu.cs.utah.edu/ubuntu jammy-updates InRelease
    W: http://ubuntu.cs.utah.edu/ubuntu/dists/jammy-updates/InRelease: No system certificates available. Try installing ca-certificates.

Use Ubuntu's default sources, as arm64 builds already did
(`ports.ubuntu.com`, which the `sed` did not rewrite);
Docker caches the package layers anyway.
This commit is contained in:
Jordan Harband committed 2026-11-18 22:54:36 -08:00
1 parent 60e2ec3b8e
commit 0054ed6022
1 file changed
-8
-8
View File
@@ -20,14 +20,6 @@ ENV DEBIAN_FRONTEND=noninteractive
# ShellCheck version
ENV SHELLCHECK_VERSION=0.7.0
# Pick a Ubuntu apt mirror site for better speed
# ref: https://launchpad.net/ubuntu/+archivemirrors
ENV UBUNTU_APT_SITE=ubuntu.cs.utah.edu
# Replace origin apt package site with the mirror site
RUN sed -E -i "s/([a-z]+.)?archive.ubuntu.com/$UBUNTU_APT_SITE/g" /etc/apt/sources.list
RUN sed -i "s/security.ubuntu.com/$UBUNTU_APT_SITE/g" /etc/apt/sources.list
# Install apt packages
RUN apt update && \
apt upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" && \