#28 - Use the France Ubuntu mirror via a UBUNTU_MIRROR build argument #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "28-use-fr-ubuntu-mirror"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Every variant now installs packages from the France Ubuntu mirror (
http://fr.archive.ubuntu.com/ubuntu) instead ofarchive.ubuntu.com/security.ubuntu.com. The mirror comes from a newUBUNTU_MIRRORbuild argument, and the README explains the change to image users: what changed, what it means for them, and how to switch mirrors or restore Ubuntu's defaults.Why
See #28. Canonical's main archive is down, so every
apt-getstalls on retries: #22'scoder-xfce-vncbuild took 48 minutes, and the first desktop attempts were cancelled after about 38. The default mirrors are usually fine, but a release can't wait for Canonical to recover, and country mirrors run on separate hosts. From the build cluster,fr.archive.ubuntu.comanswers in 55–73 ms, while everyarchive.ubuntu.comaddress times out.Changes
Dockerfile, base stage:ARG UBUNTU_MIRROR=http://fr.archive.ubuntu.com/ubuntu, with a comment explaining why, the security-update trade-off, and how to override it. Also listed in the header's build-argument list.LABEL com.van-hemmen.sindri.ubuntu-mirror="${UBUNTU_MIRROR}", so the mirror shows up indocker inspect.At the start of the first
RUN, whenUBUNTU_MIRRORis set:/etc/apt/sources.list.d/ubuntu.sourcesdoesn't exist (Ubuntu before 24.04);/usr/share/sindri/ubuntu.sources.orig;noble-security, to the mirror;URIs:line now points at the mirror.An empty value skips all of this, and the build keeps Ubuntu's sources exactly as shipped. Later stages inherit the rewritten file, so there's nothing to change per variant.
README.md:docker inspectlabel orgrep '^URIs:');--build-arg UBUNTU_MIRROR=), and what happens on bases older than 24.04;/etcisn't on the PVC, so a workspace needs thecpin itsstartup_script.USER rootstep forcodervariants) and "Version Information" updated to match.Verification
In pods on
talos-ovh-worker-two, using the step pulled from the Dockerfile by script:RUNstep onubuntu:24.04with the default mirrorubuntu.sourcesURIs: http://fr.archive.ubuntu.com/ubuntu/; suites and keyring unchanged/usr/share/sindri/ubuntu.sources.origarchive.ubuntu.com+security.ubuntu.comsourcesapt-get updateafterwardsW:/E:lines;apt-cache policyshowsfr.archive.ubuntu.com,noble-securityincludedcp …orig …)UBUNTU_MIRROR=(empty)UBUNTU_MIRROR=http://de.archive.ubuntu.com/ubuntu/(trailing slash)URIs: http://de.archive.ubuntu.com/ubuntu/ubuntu:22.04with the default mirrorUBUNTU_MIRROR needs /etc/apt/sources.list.d/ubuntu.sources (Ubuntu 24.04+); pass --build-arg UBUNTU_MIRROR= to keep the stock sources., exit 1Wording-only comment edits were made after the test; the extracted
RUNstep is byte-identical to the tested one. The branch push also starts the fulldocker-devbuild.Not verified: the
docker inspectlabel output, since there's no local Docker.Note for #22 / #23
Once this is merged, rebasing them onto
mastershould bring their build times back to normal while Canonical is down.Closes #28
🤖 Generated with Claude Code
https://claude.ai/code/session_01XPajGyTH2js52mY5WSJoNA
bf7364c48a9da5dcd20bNew commits pushed, approval review dismissed automatically according to repository settings