2018-11-25 21:25:08 +00:00
|
|
|
FROM alpine as build
|
2019-01-30 18:50:13 +00:00
|
|
|
|
|
|
|
ARG VERSION
|
|
|
|
ENV ALPINE_SERIES 3.9
|
|
|
|
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v${ALPINE_SERIES}
|
2018-11-22 12:14:28 +00:00
|
|
|
ENV ALPINE_ARCH x86_64
|
2019-01-30 18:50:13 +00:00
|
|
|
|
2018-11-25 21:25:08 +00:00
|
|
|
WORKDIR /root
|
2019-01-30 18:50:13 +00:00
|
|
|
RUN set -x; apk add --no-cache curl &&\
|
|
|
|
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
2018-11-25 21:25:08 +00:00
|
|
|
mkdir /dest &&\
|
2019-01-30 18:50:13 +00:00
|
|
|
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
|
|
|
sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_SERIES}#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories
|
2018-11-25 21:25:08 +00:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=build /dest /
|
2018-11-22 12:14:28 +00:00
|
|
|
CMD ["/bin/sh"]
|