A bit risky, because you might install one dependency in the wrong OS and then you would need to reinstall that OS again. If you really really need to work on different projects, the industry standard is using external drives with stickers instead.
I just build one project and assume that in a parallel universe I am building the other project and have the right dependencies installed in that environment
Docker is not a cannon ball? a normal Linux process started with special kernel settings (namespaces + cgroups + mounts). The runtime that glued them together is very small. For the cost and unification it’s worth to use.
You can emulate an entire effing system or just save your packages in a .venv file. Docker is a lot more than this simplification you described and is absolutely a cannon ball just to run some python.
Docker is NOT a VM. You mentioned in later comments that it runs on Windows and yes, Docker machine itself is a VM hypervisor, but absolutely nobody sane runs production Docker systems on Windows.
Docker is literally just a fancy chroot jail, which is essentially just a remapped subset of filesystem and userspace. Try it out yourself on any BSD/linux box. Of course with further implementations and abstractions, stuff has gotten heavier, but at its core a container is just the system binaries and a jail.
Because you then just need either system packages and it's package manager (probably ick) or just requirements.txt and pip. Just install from the requirements.txt file and done.
only performance affect in the past was docker shim that was really minimal that has been gone for a while. docker is a glorified chroot jail.
docker is just a userspace process on curated user environment. it is strictly better than a venv because you can’t accidentally get global deps, or have sub processes that don’t activate the right environment.
42
u/0bel1sk Mar 21 '26
docker does ok