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