February 2019
Intermediate to advanced
240 pages
5h 25m
English
In real life, a factory doesn’t come out of nowhere. It has to be constructed from blueprints: detailed plans and instructions that describe exactly what it’s supposed to look like. Docker’s container factories—in other words, images—are no different. They require a special blueprint file aptly named a Dockerfile. A Dockerfile uses special syntax to describe exactly how the image should be constructed. If you’ve heard the expression infrastructure as code, this is an example of it: a Dockerfile describes how a machine image is configured as shown in the figure.

A Dockerfile is made up of various instructions
Read now
Unlock full access