DOCKER - 4 1 Sommaire Images

Before jumping into images, let's look at what this section will cover. We'll start with the basics of images and the core concepts you'll need — what is actually inside an image, and just as importantly, what is not. We'll then explore how to find good images online, dig through some examples, and learn how to manage the images we download or build on our machines. Finally we'll create our own.

What an image really contains

An image is the application's binaries, its dependencies, and the metadata describing how to run it. The official definition phrases it as "an ordered collection of root filesystem changes and corresponding execution parameters intended for use within a container runtime". The crucial point: an image does not contain a full operating system. There's no kernel, no kernel modules like drivers. Your application doesn't need them because the kernel is provided by the host. This is one of the defining differences between containers and virtual machines — you're not booting a complete OS, you're booting an application.

Because of that, image sizes can vary enormously:

  • An image can be a single static binary — for instance a Go application compiled into one file
  • It can also be multiple gigabytes if you base it on a distribution like Ubuntu and install Apache, PHP, source code and extra modules
  • The image is just the layers between "bare application" and "full distro" that your app actually needs

The next lessons will dive into how to find images, how to manage them locally, and how to build your own — starting from this foundation that an image is fundamentally just files and metadata, not a virtual machine.

Summary

This lesson introduces Docker images as the core building blocks of containerization. An image is an ordered collection of application binaries, dependencies, and execution metadata—not a full operating system. Unlike virtual machines, images leverage the host kernel, allowing them to be incredibly lightweight (single file) or moderately sized (several gigabytes), depending on included tools and libraries.

Key points

  • Docker images contain application binaries, dependencies, and execution metadata—the blueprint for containers
  • Images do NOT include the OS kernel or kernel modules; the container host provides these, a key difference from VMs
  • Images can range from minimal (single static binary file) to full distributions (Ubuntu with package managers and libraries, several GB)
  • Understanding what belongs and what doesn't belong in an image is foundational before creating or using containers
  • This section covers image concepts, finding public images, managing downloaded/created images, and building custom images

FAQ

What exactly is a Docker image?

A Docker image is an ordered collection of file system changes, files, and execution parameters. It contains your application binaries, required dependencies, and metadata describing how to run the application—but no kernel or OS, since the host container engine provides those.

Why are Docker images smaller than virtual machine images?

Docker images don't bundle an entire operating system or kernel. Containers share the host kernel, so images only include the application layer plus dependencies. A minimal image can be a single compiled binary file; even full distribution-based images are typically smaller than VMs.

Can I create very small Docker images?

Yes. With static binary compilation (e.g., Go applications), you can create a Docker image from a single executable file. Alternatively, you can use minimal base images and include only what your application truly needs, keeping file size to megabytes rather than gigabytes.