FROM alpine:latest as tarball COPY install-build-pkgs /tmp/ RUN /tmp/install-build-pkgs ARG BUILD_TIMESTAMP=0 ARG BRANCH=master ARG GIT_REPO RUN git clone --single-branch "${GIT_REPO}" /tmp/mergerfs --branch="${BRANCH}" RUN cd /tmp/mergerfs && make version tarball RUN mkdir /build RUN cp -v /tmp/mergerfs/*.tar.gz /build/ FROM scratch COPY --from=tarball /build/ /