FROM spritsail/debian-builder as builder
ARG BUSYBOX_VER=1.27.1
# Download and build busybox from source
RUN curl -fL https://busybox.net/downloads/busybox-${BUSYBOX_VER}.tar.bz2 \
| tar xj --strip-components=1 && \
# Use default configuration
make defconfig && \
make -j "$(nproc)" && \
...
#~~~~~~~~~~~~~~~~
FROM scratch
COPY --from=builder /tmp/busybox /
CMD ["/busybox", "sh"]