Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimal Ubuntu docker image is claimed to be 29MB, so why does "docker images" command say 84.1MB?

Tags:

docker

ubuntu

https://blog.ubuntu.com/2018/07/09/minimal-ubuntu-released

says

The 29MB Docker image for Minimal Ubuntu 18.04 LTS serves as a highly efficient container...

...

On Dockerhub, the new Ubuntu 18.04 LTS image is now the new Minimal Ubuntu 18.04 image. Launching a Docker instance with docker run ubuntu:18.04 therefore launches a Docker instance with the latest Minimal Ubuntu.

I ran the exact command mentioned:

docker run ubuntu:18.04

Then I ran "docker images" which said:

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              18.04               16508e5c265d        5 days ago          84.1MB

Why does that output say 84.1MB? The Ubuntu web page I quoted says it should be 29MB.

Am I doing something wrong?

Am I measuring the size incorrectly?

How can I get an Ubuntu image that's only 29MB?

like image 782
Jacob Burckhardt Avatar asked Aug 28 '18 17:08

Jacob Burckhardt


1 Answers

The article states that on Docker Hub there is a "standard" image, that is bigger than the cloud image. The cloud image is the new thing they introduced and it weights 29MB while the standard (standard docker hub) image weights 32MB. The cloud image is not available on Docker Hub.

But still, where did that 84MB come from? It's because you are downloading a (standard) compressed image from a registry and it's being decompressed while pulling. Take a look while pulling that it's actually pulling those 32MBs ( + some bytes ). I get the same size as you have when pulling ubuntu:18.04 - while pulling only 32MB.

Meaning everything is in order. Where do you get that cloud image from? Well, I'd start by looking at:

[...] are available for use now in Amazon EC2, Google Compute Engine (GCE) [...]

If you'd like to use it with private cloud, this is where you download the image from: link to Ubuntu Minimal Cloud Images

like image 180
trust512 Avatar answered Oct 08 '22 18:10

trust512