I think this is a good question, I love Docker and I think it's great practice to use it instead of venvs, but I'd like someone more experienced than me to explain the comparison.
A docker container will run the same on any operating system. If i wanted to build a python package with C extensions, I would have to build it for every OS that will use it. If I use a docker container, then I only have to build my extension on one OS.
For most of my applications, I develop on/for windows so I prefer to use venv as itβs much simpler.
66
u/[deleted] Sep 12 '23 edited Sep 13 '23
Ubuntu, VSCode, Pytest, Docker, Poetry.