Why Use Docker ?
Tags: webdev, devops, docker, computerscience
Published: 2020-09-11 08:29:30

Hello and welcome,I want to start to tackle two very important questions that we're going to be answering throughout this entire blogpost series.This is part one.

The two important questions are **what is docker** and secondly **why do we use docker**.We're going to first tackle,why we use docker by going through a quick little demo right now.

Now I'm going to show you a little flow diagram.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5r5hcjif04wpvfeig51o.png)

This is a flow of probably,a process,you've gone through at least once in your life before.

It's a flow of installing software on your personal computer and I bet, at least, once for you this is what has happened.Maybe you have downloaded some installer,you run that installer and then inevitably at some point in time you end up getting an error message during installation.

So what do you do.

Well you probably troubleshoot the issue by looking on Google.You try to find the solution eventually and solve that issue.You then rerun the installer only to find hey you have some other error appearing.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5r5hcjif04wpvfeig51o.png)

And then you have to go through this entire troubleshooting process again.

So this is at its core, what docker is trying to fix.

Docker wants to make it really easy and really straightforward for you to install and run software on any given computer.Not just your personal Laptop/desktop but on web servers as well,Or any cloud based computing platform.I want to give you a very quick demonstration of this flow right here in action and then show you how quickly I can solve installing a piece of software by making use of docker.So I get to very quickly go through the flow of installing a piece of software called Redis.Redis is an in-memory data store.

![Alt Text](https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png)

Right now I just want to give you a quick demo of how it can be a little bit challenging to get installed on your own computer.So I'm just gonna go to the installation steps here very quickly.This is the official download page.

![screencapture-redis-io-1599811215932](https://dev-to-uploads.s3.amazonaws.com/i/ot1m8e28v9g3cn8y92fs.png)
 

In theory I could use the documentation here to install Redis on my local machine.I'm going to go down to the installation section and it very proudly says  - Oh yeah just run these four commands right here and boom that's pretty much it.

![redis installation](https://dev-to-uploads.s3.amazonaws.com/i/h6x2928e0rf8exowziki.PNG)


So I'm going to grab the first command right here.I'm going to copy it and then I'm going to run it inside my terminal.

![Capture1](https://dev-to-uploads.s3.amazonaws.com/i/8p8mvn9aejdh078qymqj.PNG)
 

I'm going to run it and sure enough,Yeah,I get an error message.
Now in this case the error message is a little bit predictable.
It's complaining about a program that is just not installed on my local machine(here wget).Now I could definitely go and troubleshoot this,install that program (wget) and then try installing redis again.

But that's the whole point.

You can get into this endless cycle of trying to do all this troubleshooting as you are installing and running software.
So let me now show you how easy it is to run Redis,if you're making use of docker,instead.
I'm going to go back to my command line and I'm going to
run one single command.

![Capture2](https://dev-to-uploads.s3.amazonaws.com/i/e7j8kf9u69vvh3p3be5t.PNG)
 
And then after a very brief pause almost instantaneously I have an instance of Redis up and running  on my computer.
![Capture3](https://dev-to-uploads.s3.amazonaws.com/i/ujjp4tsrl0slitlmb9bf.PNG)
 

And that's pretty much it.That is docker in a nutshell.That is how easy it is to run software when you're making use of docker.So to answer the question very directly of why we use docker ?

Well we make use of it because it makes life really easy for installing and running software without having to go through a whole bunch of setup or installation of dependencies.

![Capture4](https://dev-to-uploads.s3.amazonaws.com/i/60mk1k0x27rwpop6j08h.PNG)
 

Now we're going to learn many more reasons throughout this blogpost series.But I wanted to give you a very quick demo and show you how easy it can be to get up and running with some new piece of software,when you are using docker.

Next in the series  - **What is docker?** (coming up soon)!

As a full time employee, I struggle with having time to publish my  personal findings about software technologies. I believe most people do.Your contributions allow me to create what inspires me and publish my work related to web development, whether that's standalone dev.to blogpost or parts of bigger personal projects.

Support My Work - <a href="https://www.patreon.com/bePatron?u=40663296" data-patreon-widget-type="become-patron-button">Become a Patron!</a><script async src="https://c6.patreon.com/becomePatronButton.bundle.js"></script>