2018-11-25 21:25:08 +00:00
|
|
|
FROM alpine as build
|
2018-11-28 11:12:17 +00:00
|
|
|
ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v3.8
|
2018-11-25 21:25:08 +00:00
|
|
|
ENV ALPINE_VERSION 3.8.1
|
2018-11-22 12:14:28 +00:00
|
|
|
ENV ALPINE_ARCH x86_64
|
2018-11-25 21:25:08 +00:00
|
|
|
WORKDIR /root
|
|
|
|
RUN apk add --no-cache curl &&\
|
2018-11-28 11:12:17 +00:00
|
|
|
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\
|
2018-11-25 21:25:08 +00:00
|
|
|
mkdir /dest &&\
|
2018-11-28 11:12:17 +00:00
|
|
|
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
|
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"]
|