Images

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 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.