Introduction to Docker

This lesson answers some fundamental questions, such as the following:

  • What is Docker?
  • Why is it such a popular technology?
  • Why and how can we use it??

Docker technology has greatly impacted the IT industry in recent years. It gained a lot of popularity within a few years of its launch in 2013.

Need for an operating system

An operating system (OS) is unavoidably necessary to run a program. The OS creates a bridge between high-level programs and the underlying hardware. For instance, a program to move a mouse is possible because an OS is running in the background. Similarly, typing on a screen by pressing the keys of the keyboard is possible because of the low-level functions provided by an OS.

In short, if we have RAM, CPU, hard disk drive storage (HDD), or other hardware devices, we can use them only by running some program. To run any program, we need an operating system.

Therefore, to run any program or use any hardware devices, we need to install an OS. After that, we need to boot our OS and log in to our system to start working. These are significantly time-consuming tasks.

You may ask why the installation speed of an OS is of any significance when it’s to be installed once or, in case the OS crashes, a few more times in our lifetime. But here, we’re considering things on an individual level. What about an organization?

Scenario 1: Testing sectors

There are many sectors of the IT industry where we need to install the OS, run programs on the OS, and then terminate it. This cycle continues almost daily, mainly in the testing sectors. In this scenario, a lot of time can be wasted, and the companies have to pay for approximately 30 minutes a day, which roughly means 15 hours of no service each month to their employees.

This would result in a loss for the company in terms of time. In addition, they have to pay for essentially nothing. In this age of competition, a small amount of delay may result in a huge loss. The faster you work on your projects and come up with new technology, the better it is. For such a progression, this kind of delay is not acceptable.

Scenario 2: Running a program

Let’s suppose we want to work on a program. The steps could be as follows:

  1. Download some modules and packages that will allow us to run our program.
  2. Test and debugg the program.
  3. Fix errors by downloading more packages.

The process continues till our project runs successfully without any errors. After some time, if we want to run the same program on another device, we have to download the exact packages and modules again.

Again, a similar setup must be done repeatedly if we have to show the program running successfully on any other device.

In companies like Meta and Google, millions of servers run in the same environment. If any server goes down, the same settings need to be configured in some new server, maybe with different hardware and software specifications. The process can be highly time-consuming and may result in the loss of clients.

These are only some of the issues that may arise. What if someone comes to us and says they will provide us with a tool to help launch our OS within seconds? That might be hard to believe. However, Docker can do just that. The entire process of installation, booting, and logging into the system takes less than a second. In addition, we can replicate the environment we need for our work using Docker images. We’ll learn more about images in the upcoming chapters.

Different ways of launching an OS

There are multiple ways of launching an operating system:

  • Launching OS on hardware (bare metal).
  • Launching OS on virtual machines.
  • Launching OS on the cloud.
  • Launching OS using containers (containerization).

Docker is based on the concept of containers. Let’s move to the next lesson to know containers in detail.