Canonical blog mentions Ubuntu Minimal Docker images: https://canonical.com/blog/minimal-ubuntu-released. When I search Docker Hub for Ubuntu Minimal I get 10,000 results for Ubuntu Minimal where the second one seems to be a normal Ubuntu: https://hub.docker.com/_/ubuntu. I don't see any minimal names or tags. Where is the Ubuntu Minimal Docker image?
Asked
Active
Viewed 5.9k times
17
Paul Jurczak
- 1,267
-
1This is the minimum Ubuntu installation:(cloud-images/+oci/ubuntu-base): https://hub.docker.com/_/ubuntu For example (92 packages Ubuntu 23.04): https://git.launchpad.net/cloud-images/+oci/ubuntu-base/tree/ubuntu-lunar-oci-amd64-root.manifest?h=lunar-23.04 Local analog: debootstrap --variant=minbase – Johan Palych Feb 15 '23 at 08:21
-
1@JohanPalych Thank you. I've seen it yesterday, but it took a careful reading today to find the single appearance of word minimal on this page. – Paul Jurczak Feb 15 '23 at 19:16
1 Answers
8
According to https://wiki.ubuntu.com/Minimal and accepted answer to https://stackoverflow.com/questions/52063219/minimal-ubuntu-docker-image-is-claimed-to-be-29mb-so-why-does-docker-images-c, there is no publicly available Docker image for Ubuntu Minimal. Additionally, the images Canonical publishes are dated: 16.04 and 18.04.
I ended up using Debian slim: bookworm-slim from https://hub.docker.com/_/debian.
Minimum Docker image based on bookworm-slim is 73.4MB and one based on ubuntu:22.04 is 77.8MB in size.
Paul Jurczak
- 1,267
-
3So in other words, the default Ubuntu image is pretty slim to begin with .. – Artur Meinild Feb 16 '23 at 08:40
-
@ArturMeinild Unless you care about 4.4MB you can save by using Debian... – Paul Jurczak Feb 16 '23 at 19:55
-
If you want to go minimal, use Alpine as base image. But I doubt 20-25 MB make much difference for anyone these days. – Artur Meinild Feb 16 '23 at 20:00
-
2Alpine might give you more headache than free megabytes: https://dev.to/asyazwan/moving-away-from-alpine-30n4 – Andriy Makukha Nov 05 '23 at 02:16