Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active August 14, 2023 19:23
Show Gist options
  • Save magnetikonline/3a841b5268d5581b4422 to your computer and use it in GitHub Desktop.
Save magnetikonline/3a841b5268d5581b4422 to your computer and use it in GitHub Desktop.
Dockerfile Ubuntu apt-get AU mirror switching.
FROM ubuntu:18.04
LABEL maintainer="Peter Mescalchin <peter@magnetikonline.com>"
RUN sed --in-place --regexp-extended "s/(\/\/)(archive\.ubuntu)/\1au.\2/" /etc/apt/sources.list && \
apt-get update && apt-get upgrade --yes
@cloudinfra
Copy link

cloudinfra commented Jul 4, 2018

super ! thanks for this idea, was able to easily adopt this to other countries and also move from a country to the main server.
s/(\/\/)au.(archive\.ubuntu)/\1\2/
will remove au and go back to main server.

EDIT: I put your sed recipe in code blocks.

@4x0v7
Copy link

4x0v7 commented Sep 11, 2019

Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment