FROM --platform=linux/i386 alpine:latest as build COPY install-build-pkgs /tmp/ RUN /tmp/install-build-pkgs ARG BUILD_TIMESTAMP=0 ARG GIT_REPO ARG BRANCH RUN git clone --single-branch --branch="${BRANCH}" ${GIT_REPO} /tmp/mergerfs WORKDIR /tmp/mergerfs RUN make NDEBUG=1 LTO=1 STATIC=1 DESTDIR=/tmp -j$(nproc) install RUN mkdir /build RUN /tmp/usr/local/bin/mergerfs --version | head -n1 | cut -c 11- | tee /tmp/version RUN tar cvfz /build/mergerfs-$(cat /tmp/version)-static-linux_i386.tar.gz --directory=/tmp usr sbin FROM scratch COPY --from=build /build/ /