Images are what you save in repositories. They consist of a "compiled" version of your Dockerfile, including all the files that need to be run. Dockerfiles are the files that describe what an image should be, similar to source code. A Dockerfile usually results in one or more images. Images can also depend on each other and be related.

Note, for example, what a Dockerfile for Swift looks like:

FROM swift:5.1.1

This means we are using another image to base our new image on. The preceding Swift image, whose version is 5.1.1., is actually using an Ubuntu image. Similar to how classes in programming can be related and based upon each other, Docker images can be based on each other too. The nice thing is that a new Docker image only contains ...

Get Hands-On Swift 5 Microservices Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.