2 ms·
One of the reasons I try to use Docker for everything is because it's a cross-language solution. It does add some complexity and has its drawbacks, but for me,
by dguo 8y ago
One of the reasons I try to use Docker for everything is because it's a cross-language solution. It does add some complexity and has its drawbacks, but for me, it's worth it. I'd rather have one global dependency (Docker) than several (virtualenv for Python, nvm for Node, rbenv for Ruby, etc.), which all have their own idiosyncrasies.
I also like using Docker because it handles non-language resources like databases. Even installing one version of Postgres locally was painful. It's hard to imagine trying to deal with multiple instances and versions on the same machine (without something like Docker or Vagrant) if two projects use 9.x, and another uses 10.x.
- djsumdog 8y agoI use the stock Dockerhub python container with a requirements.txt. Similar to my Ruby code. It's a lot nicer than virtual envs for deployment. It's still difficult to debug stuff inside your container (unless you do a docker exec and then you're limited to the tools you installed) so it's useful to have the same environment outside of it. `pip3 --user install` has been my friend; and you can create new users instead of full virtulenvs if you really need to. Still, my python environment isn't as screwed up as this comic. System python is always only controlled by the OS package manager. My own stuff is installed with --user and things I need to deploy somewhere have a Dockerfile or I have a Jenkins workflow that create rpms/debs with fpm and push them to my repo and sign them.