loading...
Cover image for What and Why of Docker.

What and Why of Docker.

uddeshjain profile image Uddesh Updated on ・2 min read

Docker (2 Part Series)

1) What and Why of Docker. 2) Pulling the first Docker image and a few essential commands.

If you are a developer and an active community member, you must come across the term Docker. When I heard about Docker, the first question that arose in my mind is, What is Docker? And why is everyone talking about it? 🤔

In this post, we try to understand docker, and it's use cases and installation as well. So without any delay, let's dive into it.

What is Docker?

Docker is a tool that reduces the gap between Development and Deployment phase of a software development cycle.

Imagine the time when developers used to spend their time to make a machine compatible to run their code. They need to install all dependencies, setup database, and so on. This process was very time consuming, and it requires a specialised person to do this stuff.

Another scenario is, assume you have more than one application or webserver to run that uses different languages and versions of the software.

Now you may think this problem could be solved by using VMs (Virtual Machines) so...

Why Docker?

Virtual Machines makes the copy of the whole operating system, which will be GBs in size, whereas Docker needs only the part that you need to run your application. Take a look at the image below. It will help you to visualise the difference.

Alt Text

Docker is like an airtight container that runs independently without interrupting to other processes. This is the reason you can run as many containers you want at a time. Another benefit is, Docker containers are sharable. You need to run a few docker commands, and the application is ready to run, You don't have to invest time in setting up the environment. Now the days are gone when developers use to make an excuse that it works on my machine.

Alt Text

Installing Docker.

  1. Go to docker official page

  2. Signup or log in.

  3. Download Docker Desktop.

  4. Install and login to Docker Desktop.

  5. Open Terminal and run docker command.

You will see something like this.

Alt Text

Congratulations you have successfully installed docker, and it is ready to use now.

In the next post, we will learn how to use official docker images and other commands.

Until then, Bye.

bye

Docker (2 Part Series)

1) What and Why of Docker. 2) Pulling the first Docker image and a few essential commands.

Posted on by:

uddeshjain profile

Uddesh

@uddeshjain

Full Stack Web Developer, JavaScript lover ❤️, Computer Science Student. Enthusiastic about the latest technologies.

Discussion

markdown guide
 

Also between developer environments Docker is closing the gap. It's easy to set up a database with docker for example. In such a way it's the same commend for Linux / Windows / Mac. And because they are easily disposable docker containerd are also great for running performance tests.

 

There are whole lot of use cases. It totally depends on you how you can use the tool to make your work easier. 🙂

 

Is it still the case that you need to be running Windows Professional with Hypervisor enabled? What is the workaround for folks who either cannot alter their system settings due to IT lockdown, or for those who don't have the Professional/Education version of Windows? Assuming there is still two different products (Docker and Docker for Windows) depending on your Windows configuration, what are the differences in setup and use of the two Docker versions?

 

There are some differences between docker desktop(win 10 professional) and docker toolbox(win 7 and win 10 home).
Some differences can be inferred by understanding how it works.

docs.docker.com/toolbox/toolbox_in...
docs.docker.com/docker-for-windows/

 

The workaround is to use Docker Toolbox, as @Mahindra said. I am not sure, but I think you can achieve same things with both Toolbox and Desktop, since the main tool for Docker is its CLI. I have started using Docker recently, and in my team some used Hyper-V and other used VirtualBox, and we managed to configure Docker with success in both cases.

 

Docker has different applications for Mac and Windows and for Linux you have to install Docker demon. Installation process is quite easy. You just need to download and run the setup that's it.

 

I am not really a Docker user, so I mainly wonder,

  • Is Docker really free?
  • Is Docker deployment on a real server free?
  • Where do I host Docker images? Do I need to host Docker images?
  • Can Docker be used outside web dev?

Alright, I have truly used Docker once; to deploy Electron Builder for Mac and Linux. I believe it feels like running a small Linux VirtualBox with Wine; but might be smaller and much better than downloading a whole Ubuntu, and install it on a VirtualBox...

Maybe I can install Binaries and Runtimes on Docker as well.

 

As you already used Docker. I think you got answers of your questions.