Book Image

Beginning DevOps with Docker

By : Joseph Muli
5 (1)
Book Image

Beginning DevOps with Docker

5 (1)
By: Joseph Muli

Overview of this book

Making sure that your application runs across different systems as intended is quickly becoming a standard development requirement. With Docker, you can ensure that what you build will behave the way you expect it to, regardless of where it's deployed. By guiding you through Docker from start to finish (from installation, to the Docker Registry, all the way through to working with Docker Swarms), we’ll equip you with the skills you need to migrate your workflow to Docker with complete confidence.
Table of Contents (7 chapters)

Overview of a Multi-Container Application Setup


In the previous lesson, we introduced Docker and containerization. We ran sample Python and JavaScript scripts as demonstrations of how applications can be containerized and how images can be built. We are now ready to run an application that goes beyond that.

In a Dockerfile, every line describes a layer. The union filesystem used in Docker allows different directories to transparently overlay, forming a single, coherent filesystem. The foundational layer is always an image which you build upon. Each additional line with a command, say, RUN, CMD, and so on, adds a layer to it. The advantage of layers is that as long as the layer has not been modified, it will not bother building that part of the image. Secondly, as an image is pulled from a Docker image registry, it is pulled in layers, therefore mitigating issues such as connection cuts during pulling and pushing of images.

Many applications are built under a common structure: frontend, backend...