4 ms·
> Why is docker better than virtualenv with a requirements.txt file? It's not, it solves a different issue. If you only have Python as dependency, requirements
by anyzen 8y ago
> Why is docker better than virtualenv with a requirements.txt file?
It's not, it solves a different issue. If you only have Python as dependency, requirements.txt are fine (well, user needs to install correct version of Python, pip and virtualenv / pipenv, but that's doable). But as soon as your app is actually composed of nginx / apache, python, some background process in Rust, bash scripts for cron jobs,... then you have a problem with app delivery, which Docker solves nicely. Just package eveything in a Dockerfile and distribute the image. Bonus point: you can now test it locally, with the same installation.
I jumped on Docker wagon very early for this exact reason. I don't care about hype, but it does solve these kinds of problems.
- deleted 8y ago[deleted]