Skip to content

Introduction to Docker

Introduction

Docker is a platform that allows you to separate your applications from your infrastructure in order to allow you to package and ship applications that can run on any machine that also runs Docker. To do this, Docker uses a defined Dockerfile to package your environments in an image, and then allows you to run your image/application in an exectuable container. This relationship is visualised below.

graph LR A[Dockerfile ] -->|build | B[Image ]; B -->|run | C[Container ];

Docker allows publishing of these images to a DockerHub repository, where these images can be downloaded to any machine that has access to that DockerHub repository. Docker uses the Docker Dameon to manage these requests. Docker can even be clustered across multiple hardware nodes using a Docker Swarm, consisting of joined Docker Nodes. Across this swarm, a list of Docker Services (multiple containers of the same image) can be managed through a Docker Stack. Furthermore, persistent data storage in these collapsable containers are managed through Docker Volumes, and the containers can communicate with each other using Docker Networks.

Phew, that's a lot of terminology! But it's not as complicated as it may seem. In the following sections, we'll teach you about each of these Docker tools individually, such as the configuraion files they need, the commands needed to run them, and how they intertwine together.

How to install Docker

Docker can be downloaded from https://www.docker.com/get-started/. Select the installer for your machine and execute it once downloaded.