Explain Docker Like I'm Five

What is it actually and why/when/where should I/could I use it?

Did you find this post useful? Show some love!

Once upon a time before Docker if you wanted to have a unified dev environment where a new hire wants to start working if they're lucky there is a vagrant setup which sucks up 80% of your system's resources or more typically some out of date documentation like "download this thing, extract it here, add these env vars" and then it still doesnt work.

In the world of docker you can very easily configure all the system dependencies you need for your project in a consistent, easy way with a few config files.

Not only that but if you work with docker locally and in production you can say "it works on my computer" and with some legitemacy expect it to work in production too.

Docker is not without problems but a lot of my dev life has been wasted reconfiguring snowflake db setups because they got out of date in CI vs live or vs dev.

Docker brings a unified way of setting up your work in a production-like environment

Got it!

Could I make a parallel to Python virtual environments, with a requirements.txt file? I understand that Docker is more encompassing, while Python virtualenvs are Python-only, but it is the same base idea, right?


I haven't done much Python but from what i understand that means when you cd into the directory it sets up the env vars for you?

If yeah, kinda?

As always, the best thing to do is try it yourself.

Get docker installed and then set up a docker-compose file with a DB configured in it. Do docker-compose up, smile. Then add another db to the file and then pick your jaw up from the floor when you realise how easy it all is.

There are some parallels in concept maybe? The key difference is while Python Virtual Environments isolate which Python interpreter, environment, and paths you use, its still apart of the host system.

Docker images are only reliant upon the host kernel and run isolated from the system like a sandbox.

Example: Wanna test what a particular command or python script will do to a system without affecting the actual host? Run it inside a docker container.

I think this will help. They explain containers and Docker


Classic DEV Post from May 18

Async + Await refactor, which do you like best?

Async + Await is soo good.

Follow @wilburpowery to see more of their posts in your feed.
Daniel da Rocha
fulltime architect coding during coffee breaks
Trending on dev.to
What has programming taught you that you keep-in-mind/use in your daily life?
So Long, and Thanks for all the Fish World of Warcraft
#career #productivity #mentalhealth
10 golden rules for becoming a better programmer
#career #dev #help #tips
Note taking as a developer
#discuss #notes
Memoization in a Nutshell
#explainlikeimfive #beginners #javascript
How to run Laravel using Docker
#laravel #docker #operations #testing
What are good ways to learn software architecture and systems design?
#advice #discuss #architecture #reading
What's in your bookmarks bar?
#tools #productivity #discuss