mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-11-20 16:22:52 +03:00
[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:
1 file changed
-8
@@ -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" && \
|
||||
|
||||
Reference in new issue
Block a user