Getting Started with Docker

0
516
Docker

Docker is a well-known term today, and we often hear of it in relation to DevOps.
This article is for those of you who want to learn about this amazing virtualisation software but don’t know where to begin. It will tell you how to install and start using it.

Docker is basically an operating system level virtualisation software that is used to provide software applications in a file in the form of containers. Docker Inc., which developed this software, offers both paid and free services.

This application based virtualisation software is really important today, because unlike virtual machines it does not need much space or processing power. It only needs the Docker software to run the container, and the container therefore becomes compatible with any operating system or environment. Almost all IT companies today use Docker for one service or another, making it an essential skill for software engineers and open source enthusiasts.

So let’s learn how to install and set up Docker on our Ubuntu machines, and then we will run our first Docker container, which is like the ‘hello-world’ of the Docker/DevOps world; the container app is also called Hello-World!

To begin, update your package manager using the following command (as shown in Figure 1):

Figure 1: Package manager update
Figure 1: Package manager update
sudo apt update

Then, upgrade it to add any new packages required using the following command:

Figure 2: Package manager upgrade
Figure 2: Package manager upgrade
sudo apt upgrade

The next step is to install the docker.io; you can use the following command (as shown in Figure 3):

Figure 3: Installation
Figure 3: Installation
sudo apt install docker.io

Now you can check if the installation worked — you can use the following command to check the version of Docker installed:

jishnusaurav@jishnusaurav-L340-15IRH-GAMING:~$ docker --version

Docker version 20.10.12, build 20.10.12-0ubuntu2-18.04.1

You have finished installing Docker and the setup is complete. You can now pull the first image and run it (as shown in Figure 4).

Figure 4: Using the hello-world image on Docker
Figure 4: Using the hello-world image on Docker
sudo docker run hello-world

So, that is all! You have run your first Docker container! That is pretty cool. Now go ahead and read the Docker documentation, which will help you use more and better application containers on Docker.

LEAVE A REPLY

Please enter your comment!
Please enter your name here