Choosing a Base Image
Recall from the discussion in Chapter 2 that a Docker image is defined using a Dockerfile, which is a set of commands that are executed to create the image. Commands can include tasks such as downloading and installing applications or packages, copying files, setting environment variables, configuring what to execute when a container is started, and more. Each command in a Dockerfile is built as a separate layer and Dockerfile commands are stacked on top of one another in a hierarchy of layers. What this means is that development teams can take advantage of layering to create a base image that includes any shared components or configuration settings. Teams can start with this base image and customize as needed for improved ...
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.