You Should Learn Docker Right Now!! Here’s Why

MayhemCode
CodeX
Published in
3 min readJun 4, 2021

Hmm so most of you might know about docker and maybe you don’t even know about it.

Let’s start thinking about it by asking ourselves why we need docker. For all of you developers out there they might come to a situation where they have to send their work to their Boss and run it, but sometimes the program or software might run in your pc or laptop but might not run in their devices. Or maybe simple let’s take an example you’re making a Node application with some database and you have done all the stuff and it’s working well but when you send it to others sometimes it might not work. Maybe due to different dependencies or maybe the node application cannot interact with the database server this issue may be critical sometimes because we have to check which versions to use and which software to use which might be a tedious job.

Now docker comes into the picture. Docker is a container. So first let’s talk about containers. You can think of containers as just the containers near some ship dock and the ship dock is a docker. As all the content of the containers is isolated from other containers same goes for docker containers. The isolation in computer software is very important nowadays for many reasons first it provides security if one part of the container is affected it doesn’t reach the other containers. If there is some problem with the software we can figure it out quickly.

But What actually does Docker store?

We might sometimes hear about virtualization or virtual box or VMware this is the software and technologies which let us run diff operating systems in the space pc. docker takes it to next level. In a virtual box architecture at the base, it has a main operating system then the hypervisor, and the diff virtual boxes on which we can install the different operating systems but in docker, it’s a lot more clear it removes the hypervisor part and directly interacts with the host operating system. Bonus point for the less size of docker which is far less compared to the virtual box.

Getting started with Docker…

For building and working with docker we need some commands and experience with docker

So let’s get started Fire up the terminal and let’s do some docker commands.

sudo apt-get install docker

So, docker, has a site owner has Docker Hub where it has all the required images for docker which we can pull and start building it. For this, we shall pull a ubuntu image

docker pull ubuntu

We will make a container now With the name Our_First_docker_container

docker run -d -t — name Our_First_docker_container ubunto

That’s it you just build your first docker container that too within seconds by virtualization it may take a lot more time.

To see all the running processes we can use.

To get into the container we can use the following command

docker ps Docker exec -it {your container name} bash

For More info on Docker and its uses Visit:

https://www.mayhemcode.com/2021/06/what-is-docker.html

Originally published at https://www.mayhemcode.com on June 4, 2021.

--

--

MayhemCode
CodeX
Writer for

Blogs on Daily Tech, Science, Crypto and Computer_Science related Stuff