5 ms·
If you have projects with different versions (python2/3, Java5/8, node8/11 etc) you don't need to bother with version managers and package managers anymore. Ju
by kkapelon 6y ago
If you have projects with different versions (python2/3, Java5/8, node8/11 etc) you don't need to bother with version managers and package managers anymore.
Just launch the respective container and you are good to go.
- misiti3780 6y agofor python, why cant you use use virtualenv with pyenv?
- miscaccount 6y agobecause setting and configuring virtualenv is also chore and loads of things that can go wrong. Its different in windows to mac to linux. With docker its a single command run after installing docker.
- TeMPOraL 6y agoYou could, but then maybe you have some editor-specific settings you'd also want to tie to particular project. And if you're working with multiple projects in multiple languages, why bother learning each language's equivalent of virtualenv (assuming it has any), when there's an universal method available?
- kkapelon 6y agoBecause it is a Python specific thing. Docker works with all programming languages and that's it. If you are full stack or work with multiple programming languages there is no need to learn the "equivalent" of virtualenv everywhere else. Also with docker there is no setup/installation involved. You just pull the image and that is it. Also virtualenv requires that you already have pip/python installed. Docker requires nothing (apart from itself). So you can instantly launch Java/Node/Erlang/Haskell whatever without any SDK/libs installed.
- collyw 6y agoI think every programming language that I have used has had something equivalent.
- kkapelon 6y agoLet's assume that this is true (I don't think that languages like C/C++ have this but I may be wrong). If I use 4 programming languages why learn 4 tools instead of one (Docker)?
- darkteflon 6y agoSecond this. Developing in Docker completely liberated me from the caprice of Python packaging and Node dependency management and made doing development work on multiple platforms (MacOS, Ubuntu) frictionless. There’s a “pets vs cattle” angle here, too. Something goes wrong, just pave over it and start again. YMMV, of course, but I can’t imagine going back.
- nickjj 6y agoI wrote this article a while back that compares setting up a Python development environment for web development with and without Docker: https://nickjanetakis.com/blog/setting-up-a-python-development-environment-with-and-without-docker https://nickjanetakis.com/blog/setting-up-a-python-developme... The TL;DR is there's a lot of things to set up yourself without Docker in order to run a typical web application and it's different depending on what OS / version you use. Some of these things are unrelated to Python too, such as running PostgreSQL, Redis, etc. but these are very important to your overall application. Docker unifies that entire set up and the barrier of entry is installing Docker once and then learning a bit about it.
- potta_coffee 6y agoA couple of years ago I got your Docker course and I learned a lot from it, been doing Docker chores for my teams ever since. Anyway, good course!
- nickjj 6y agoThanks a lot!
- cashewchoo 6y agoBecause projects are seldom as simple as that, potentially having lots of other kinds of dependencies (a directory structure, system libraries/command, symlinks, other services running, etc). And let's be honest, virtualenvs and all the various ways they're managed and updated and such aren't really bulletproof either. It's really, really refreshing how much "yeah I managed to break my dev environment" or "I followed the wiki for how to start developing your project but it 'didn't work'" can be avoided if it's just "run docker(-compose)?". And this is especially true for junior developers, who are probably fresh out of college and won't be familiar with lots of the tooling that exists in the world. Not that docker is a simple tool, but it can hide so much complexity that it is easier to just show people how to docker run and docker build and such.
- pilotneko 6y agoSo, speaking as a data scientist, the dependencies run deeper than Python kernels and libraries. For something like TensorFlow, you need to account for specific versions of Nvidia drivers and CUDA/CUDnn. Using something like the Nvidia container runtime for model development allows me to essentially version my entire development environment.
- misiti3780 6y agogood point.