Minimal Debian Base Image for Docker

  1. Be on a Debian host.
  2. Install debootstrap.
  3. Have docker.
  4. Do this, but replace all instances of bullseye with whatever version of Debian you want.

.

$ debootstrap --variant=minbase bullseye bullseye-minbase
$ ls
bullseye-minbase
$ tar -C bullseye-minbase -c . | docker import - bullseye-minbase

Done.

https://wiki.debian.org/Debootstrap
https://docs.docker.com/develop/develop-images/baseimages/

Matt Traudt (pastly)

Tech, Pets, and Vettes


2021-10-18