From f467849a024c6d57b262e3d701f841a4960d6dc4 Mon Sep 17 00:00:00 2001 From: Justin Clift Date: Sat, 21 Oct 2023 15:01:31 +1000 Subject: [PATCH] Use a fast Alpine package mirror Without forcing a specific Alpine package mirror, it seems to use the very slow default one. This means building the docker image can take 2+ hours (as happened yesterday). With this change in place, building the docker image takes around 5-6 minutes. --- docker/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 57c516cf0..49ac83a81 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,6 +21,11 @@ RUN addgroup -S rabbitmq && \ adduser -S -D -h /var/lib/rabbitmq -s /sbin/nologin -g "Linux User,,," -G rabbitmq rabbitmq && \ chown -Rh rabbitmq: /opt/rabbitmq /var/log/rabbitmq +# Use a fast Australian mirror for the Alpine package repositories +# Without doing this, building the image can take 2+ hours. :( +RUN echo "https://mirror.aarnet.edu.au/pub/alpine/v3.18/main" > /etc/apk/repositories && \ + echo "https://mirror.aarnet.edu.au/pub/alpine/v3.18/community" >> /etc/apk/repositories + # Install Git, Go, Memcached, Minio, and PostgreSQL RUN apk update && \ apk upgrade && \