Why containers is such a good thing, apart from the technical side
Docker and Container are no doubt a genius technical invention of isolation processes and preventing certain hacks on your servers, but docker has brought more than that. It has also helped on the human end of things, on how we develop applications, which is often not easy to explain and hence we end up talking about the technical side, so here it goes!
Never have I tried soo much new software!
I would never have tried so many new and cool open source software projects if it was not for docker. Trying out a new database only takes a few minutes and it works the same on every newcomer’s computer, which makes the lives of the maintainers much easier!
Much faster switching between projects
Sometimes the amount of time that I would have to spend to startup different projects meant I have either been drinking a lot of coffee (vagrant anyone?) or stressed a lot about steps that you had to remember to follow to make it work. Now I can switch between projects like this easy!
And then in the next project 10 seconds later:
That has meant a huge improvement in my productivity!
Put your infrastructure in code — finally easy!
There has been a lot of ways that you document your infrastructure and then commit it to the project, and when I started doing that a huge burden was lifted. Now you did not have to guess which of servers and setup your code needed it followed the code, but it has never been easy to also use in development.
I have tried it many times and getting developers to look through Ansible code and modules is not something that happily does and worst of all it was often split between a lot of files (to keep the maintainers sane)!
But with docker-compose you define your whole application in a single file. You can easily see which ports each app listens on, how they depend on each other (eg. the database needs to start before the webserver), and where the files are located inside.
It made things predictable in teams
Everybody have tried getting a new computer and then crossing their fingers in hope of the project also works on that machine, but never again. The baseline is that the project can be started on a new computer every time without you have to think about it! That is so powerful if you are working in teams as you can focus on the real errors instead of the differences between each other’s computer.
I have tried way to many times that even though it is the same software installed, it is slightly different which makes a huge difference!
(Just to name a few, MySQL table names is case sensitive on Linux and case-insensitive on Windows, node.js requires filenames are by default case insensitive on Mac, but case sensitive on Linux)