Dive Into Docker

Dive Into Docker

Docker

Let's ask two important questions

  1. What is Docker?

  2. Why is Docker used?

The above illustration shows the steps to install the software. This process can get quite hectic. Docker tries to solve this problem. Docker helps you to install any software easily on a given computer.

Let's try installing Redis using Docker.

Enter the ' docker run -it redis' command into your terminal.

Thus docker makes it easy to install and run software without worrying about the setup or dependencies.

So this answers the question of why is docker used.

Docker is an ecosystem around running and creating containers. All these pieces of software come together to form an ecosystem.

When the docker command is entered into the terminal the Docker CLI reaches out to the Docker hub and it downloads an image.

An image is a single file that contains all the dependencies required to run a specific program.

This file is stored on the hard drive. A container is an instance of this image that runs the program.

Let's enter the first meaningful command 'docker run hello-world'.

So what actually happens behind the scenes

When the command is entered the docker client reaches out to docker server. The docker server then then checks into the docker hub for the image. Then the docker server downloads the image. Then this image is converted to a container.

When the container is created the hello world is executed and we get this.

The container is not a physical construct. It groups all the resources assigned.

How is Docker running on the computer?

When you install the docker client in your system it also installs the Linux virtual machine on your system.

Did you find this article valuable?

Support Reuben's blog by becoming a sponsor. Any amount is appreciated!