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 the difference between the inherited image. This means our final image can be quite small.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.22.216