DEV Community

Cover image for Why Use Docker ?
Data Structures
Data Structures

Posted on

Why Use Docker ?

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

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

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

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

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

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

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

And then after a very brief pause almost instantaneously I have an instance of Redis up and running on my computer.
Capture3

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

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 - Become a Patron!

Top comments (0)