I'm a jr. developer and I'm being required to learn docker. I googled around and read a bunch of articles about docker but couldn't really understand what it was for, what problem does it solve.

Example about GIT. When I was at university when we had our thesis, my groupmates and I use facebook messenger or email to pass parts of the code, we indicate what file is it for and on what line, so I understand how GIT resolves a problem. but what about docker? When I deployed to AWS, I ssh thru the server, git clone your repo, do an npm install, so whats the difference? I still have to do that right but with one command? docker compose run or something? so thats it? hope someone can explain it to me. thank you and have a good day.

  • 1
    I post as a comment 'cause many people here will be able to give you a full overview of what docker is and what it does solve, but here is my 2 cents: Docker allows one to ship a application in a independent form factor, that is the docker container. Instead of shipping a war or any other form of software packaging for which you may need to install dependencies and other fun stuff like this, you just ship the container which has been built by dev team with all required dependencies. This way allow ops to deploy the container as is without having to even think about the fun stuff – Pier Oct 24 '19 at 15:30
  • @Pier can you give a example on how we dev ops used to do it? without docker? – aRtoo Oct 24 '19 at 18:01
  • For future reference try explaining which parts you dont understand instead. I refuse to believe that you read even a single article about what docker is the way you phrase your question. :P – Birb Nov 5 '19 at 22:34
  • some of it I read but they don't explain what it is for. so i cant really see the purpose. I found a video explaining how devops deploy before without docker vs with docker and it really helps. and i guess im exaggerating. :) lol – aRtoo Nov 5 '19 at 22:50

Docker is a technology that allows you to create OS-level virtualization for software delivery. There are many, many articles written about what this technology is, how it can help developers and companies, and tutorials on how to get started.

To answer your question of why as a developer you may care (non-exhaustive list):

  • Building an application that is immediately ready for deployment.
  • Removing cumbersome installs for quick prototyping and testing. I use it all the time to setup a SQL server to test scripts before deploying them.
  • Removes the "It works on my machine" since all the application dependencies are in a "container".
  • Allows you to easily run and port services that usually would require several minutes of installations and configurations.

For your AWS example, imagine not having to SSH into a server, pull source down, and setup the environment every time you want to scale up or out. Most cloud providers now have options to deploy your containers and not worry about all those steps (see AWS ECS).

The Docker-Compose you mentioned is slightly different in that it is a way to easily run multiple containerized services together.

Not the answer you're looking for? Browse other questions tagged or ask your own question.