r/AskComputerScience • u/[deleted] • Aug 14 '19
Docker
What problem does docker (and containers) solve? And in which projects should it (or not) be used?
Maybe an Eli5 because I made a long research and didn't get an answer yet.
37
Upvotes
2
u/HasFiveVowels Aug 15 '19 edited Aug 15 '19
It seems everyone always eschews the benefits of docker without looking at the drawbacks. I have about 10 years of experience designing, building, and maintaining web applications, some that host hundreds of thousands of users and others that handle all sorts of high volume communications. My opinion of docker comes from my experience in this role. About 5 years ago, during the height of docker mania, I gave it a go on one of my projects. And I learned I gained basically nothing that wasn't already a trivial concern and what I lost was stuff like the ability to interact directly with the OS, its networking, etc. It seems everything has this additional layer of complexity. And... for what? Easier deployment? How many deployments are you doing, exactly? And, also, if you're working on a project like this I would guess you're using AWS or Google Cloud Services to host it and, if you are, just make a disk image of the install and deploy instances. Instances are basically docker containers already and come with a full API for managing them. Furthermore, why is it necessary for these applications to have this Java-y "write once, run anywhere" aspect? These are servers! You have full control over the environments! (edit: just realized that I take for granted that my computer is MacOS and I run on linux, so dev environments is never an issue for me) Managing environments is not such an overwhelming task that it needs a solution that involves this entire pseudo-VM to run your application in. If it is, then I would assume you're working on a "very heavy project" (as I alluded to in my previous comment). A lot of the things that docker solves are things that should be possible with a small script or that just aren't that big of a concern for projects of a moderate size. Just my two cents and I know others disagree but, IMHO, docker's not all it's cracked up to be.