Why Docker over something like venv or npm? #80
-
|
I’ve been checking out the fivelib project and noticed there’s a whole setup for Docker. Since I'm still pretty new to this, I’m a bit confused about one thing. Why do automation projects like this use Docker when Python already has venv to isolate libraries (or npm for other stuff)? Doesn't Docker add a lot of extra 'weight' or complexity compared to just using a simple virtual environment? I’m trying to wrap my head around what problems containers actually solve here that a standard venv can't handle. If anyone could break down the practical difference for me, I’d really appreciate it! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
That's a great question! It’s a common doubt when starting out. While venv or npm are great for managing language-specific dependencies, Docker operates on a completely different level. Here’s why we use it in fivelib: 1. Environment Consistency (The "It works on my machine" fix)
2. Ease of Use and Isolation 3. Infrastructure and Deployment (VPS) |
Beta Was this translation helpful? Give feedback.
That's a great question! It’s a common doubt when starting out. While venv or npm are great for managing language-specific dependencies, Docker operates on a completely different level. Here’s why we use it in fivelib:
1. Environment Consistency (The "It works on my machine" fix)
Virtual environments like venv only isolate Python packages. They don't account for the OS version, system-level libraries, or environment variables. Docker mitigates errors like: