this post was submitted on 04 Sep 2024
24 points (90.0% liked)

Python

6229 readers
10 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

๐Ÿ“… Events

October 2023

November 2023

PastJuly 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

I read some articles about using a virtual environment in Docker. Their argument are that the purpose of virtualization in Docker is to introduce isolation and limit conflicts with system packages etc.

However, aren't Docker and Python-based images (e.g., python:*) already doing the same thing?

Can someone eli5 this whole thing?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] uthredii@programming.dev 2 points 2 weeks ago

If you do multi stage builds (example here) it is slightly easier to use venvs.

If you use the global environment you need to hardcode the path to global packages. This path can change when base images are upgraded.