Reputation: 2075
If I pull a Ubuntu image from Docker Hub using docker pull ubuntu:14.04
and then list my images with docker images
I see that the Ubuntu image has a virtual size of just ~188MB. I don't understand why the image size is so much smaller than the size of an Ubuntu ISO that I might use to run a VM on OS X. I use OS X, so I use docker-machine to set up a docker daemon. How is Docker able to run an Ubuntu image on OS X with such a small footprint?
Upvotes: 32
Views: 12401
Reputation: 22710
Because docker images usually contain only the bare minimum. In case of an Ubuntu image, it contains only the base system without GUI (which is rarely used in containers) and without most tools. Ubuntu's docker image is actually relatively big; there are much smaller ones.
Upvotes: 30