From 8119dd031ffa71cd9e0cf7073b909f13a164fc12 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 28 Nov 2018 12:12:17 +0100 Subject: [PATCH] use configured mirror for apk repository --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d58b42..b5a505f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ FROM alpine as build -ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v3.8/releases +ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v3.8 ENV ALPINE_VERSION 3.8.1 ENV ALPINE_ARCH x86_64 WORKDIR /root RUN apk add --no-cache curl &&\ - curl -LO ${ALPINE_MIRROR}/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\ + curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\ mkdir /dest &&\ - tar -C /dest -xvzf alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz + tar -C /dest -xvzf alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\ + sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v3.8#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories FROM scratch COPY --from=build /dest /