FROM alpine as build ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v3.8/releases 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 &&\ mkdir /dest &&\ tar -C /dest -xvzf alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz FROM scratch COPY --from=build /dest / CMD ["/bin/sh"]