Last active
December 8, 2016 16:17
-
-
Save n-johnson/fe0ea2be863fa3f9b0aa2b87af9ffe84 to your computer and use it in GitHub Desktop.
Ubuntu use apt mirror
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sed -i -e 's/\/archive.ubuntu.com/\/us.archive.ubuntu.com/g' /etc/apt/sources.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Speed up slow apt default server | |
ENV DIST=xenial | |
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt $DIST main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt $DIST-updates main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt $DIST-backports main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt $DIST-security main restricted universe multiverse\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix super slow default archive.ubuntu.com | |
DIST="xenial" | |
echo -e "deb mirror://mirrors.ubuntu.com/mirrors.txt $DIST main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt $DIST-updates main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt $DIST-backports main restricted universe multiverse | |
deb mirror://mirrors.ubuntu.com/mirrors.txt $DIST-security main restricted universe multiverse\n$(cat /etc/apt/sources.list)" > /etc/apt/sources.list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment