Skip to content

Instantly share code, notes, and snippets.

@AlexisDucastel
Created November 29, 2021 00:03
Show Gist options
  • Save AlexisDucastel/7e85dc2082ef8f0b307a499d023d606b to your computer and use it in GitHub Desktop.
Save AlexisDucastel/7e85dc2082ef8f0b307a499d023d606b to your computer and use it in GitHub Desktop.
Dockerfile for debootstrap mini container from scratch
FROM busybox:latest AS bootstrap
ENV OSURL=https://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-minirootfs-3.15.0-x86_64.tar.gz
RUN wget ${OSURL} -O /$(basename ${OSURL}) \
&& mkdir /bootstrap \
&& cd /bootstrap \
&& tar -xf /$(basename ${OSURL})
#=== Build base container =========================
FROM scratch
COPY --from=bootstrap /bootstrap/ /
CMD ["/bin/sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment