Docker Community Forums

Share and learn in the Docker community.

FROM and actual parent image differences in library images


(Rares Vernica) #1

Hi,

I am looking into setting up containers from the Django and MariaDB library images. After pulling the Debian images on which they are based, I notice that in fact they are based on different images. Why are they different?

I am fine with the fact that they originate from different Debian versions. The problem is that after pulling debian:wheezy debian:jessie python:2.7.9-slim mariadb:10.0.19 and django:1.8.1-python2 my docker images --tree has four roots instead of two as I was expecting. I was wondering why is this the case and why two roots are not enough.

Here is the output of docker images --tree:

~  docker images --tree
Warning: '--tree' is deprecated, it will be removed soon. See usage.
├─7a3e804ed6c0 Virtual Size: 84.97 MB
│ └─b96d1548a24e Virtual Size: 84.97 MB Tags: debian:wheezy
├─39bb80489af7 Virtual Size: 125.2 MB
│ └─df2a0347c9d0 Virtual Size: 125.2 MB Tags: debian:jessie
│   └─bf6bfe0c97f9 Virtual Size: 125.2 MB
│     └─208e0b17a864 Virtual Size: 125.2 MB
│       └─0336945f179b Virtual Size: 132.6 MB
│         └─41a56858bc2c Virtual Size: 132.6 MB
│           └─fdc7b1dd741f Virtual Size: 132.6 MB
│             └─8a1d7f9a750b Virtual Size: 132.6 MB
│               └─e5f821698576 Virtual Size: 198.3 MB
│                 └─89799c492a50 Virtual Size: 205.8 MB
│                   └─e86252d03b37 Virtual Size: 205.8 MB Tags: python:2.7.9-slim
├─3cb35ae859e7 Virtual Size: 125.1 MB
│ └─41b730702607 Virtual Size: 125.1 MB
│   └─fc00109c41f7 Virtual Size: 125.1 MB
│     └─75379c09b3a1 Virtual Size: 125.1 MB
│       └─3ab5bcb921bb Virtual Size: 132.6 MB
│         └─0b7ecc27d9b3 Virtual Size: 132.6 MB
│           └─fed86e2ee013 Virtual Size: 132.6 MB
│             └─dc5f3a187979 Virtual Size: 198.5 MB
│               └─3c919a2377e2 Virtual Size: 205.9 MB
│                 └─8320d6315882 Virtual Size: 205.9 MB
│                   └─aa358779e6cf Virtual Size: 391.2 MB
│                     └─240006ee8839 Virtual Size: 391.2 MB
│                       └─876b19815c10 Virtual Size: 421.5 MB Tags: django:1.8.1-python2
└─21e4345e9035 Virtual Size: 84.98 MB
  └─b3d362b23ec1 Virtual Size: 84.98 MB
    └─8e623b39f61d Virtual Size: 85.31 MB
      └─0e8c86e8ff13 Virtual Size: 85.4 MB
        └─5dfc1ea9c9f8 Virtual Size: 85.4 MB
          └─5a3c178f8709 Virtual Size: 85.4 MB
            └─15bd87e6f115 Virtual Size: 85.4 MB
              └─322f4b8bdaa4 Virtual Size: 257.7 MB
                └─36d8382f320e Virtual Size: 257.7 MB
                  └─4bff332ba950 Virtual Size: 257.7 MB
                    └─fd6ba175e7ca Virtual Size: 257.7 MB
                      └─e05042100ce2 Virtual Size: 257.7 MB
                        └─8fee34048813 Virtual Size: 257.7 MB Tags: mariadb:10.0.19

Thanks!
Rares

P.S. I am aware that docker images --tree is deprecated and that in reality I don’t need to pull the Debian and Python images separately.