use mirror:// protocol for apt
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Jeffrey Paul 2020-02-16 05:53:07 -08:00
parent 41114ce60a
commit f6efe03551
2 changed files with 5 additions and 11 deletions

View File

@ -4,7 +4,7 @@ ARG USERNAME_TO_ADD=user
ARG UID_TO_ADD=1000
ARG GID_TO_ADD=1000
ARG UBUNTU_MIRROR_URL=http://us.archive.ubuntu.com/ubuntu
ARG UBUNTU_MIRROR_URL=mirror://mirrors.ubuntu.com/mirrors.txt
# setup
ADD ./run.sh /tmp/run.sh

14
run.sh
View File

@ -6,18 +6,12 @@ set -e
exec 1> >(tee -a /var/log/sandboxbuild.log) 2>&1
MURM="main universe restricted multiverse"
M="http://us.archive.ubuntu.com/ubuntu"
C="$(lsb_release -cs)"
if [[ ! -z "$UBUNTU_MIRROR_URL" ]]; then
M="$UBUNTU_MIRROR_URL"
fi
cat > /etc/apt/sources.list.new <<EOF
deb $M $C $MURM
deb $M $C-updates $MURM
deb $M $C-backports $MURM
deb $M $C-security $MURM
deb $UBUNTU_MIRROR_URL $C $MURM
deb $UBUNTU_MIRROR_URL $C-updates $MURM
deb $UBUNTU_MIRROR_URL $C-backports $MURM
deb $UBUNTU_MIRROR_URL $C-security $MURM
EOF
PKGS="