Build a Hierarchy of Images

To get a better understanding of how to factor real-world images, we’ll look at the hierarchy of the node:latest image at the time of this writing, starting with the very first image in the hierarchy

debian:jessie: This Dockerfile starts from scratch, meaning it is a base image. It includes a single command to add “rootfs,” the root filesystem which also adds command line tools like bash, cat, and ping. It also sets bash as the default command if you were to create a Debian container.

buildpack-deps:jessie-curl: This Dockerfile starts from debian:jessie and runs the apt-get package manager to install curl, wget, and ca-certificates.

buildpack-deps:jessie-scm: This Dockerfile starts from buildpack-deps:jessie-curl ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.