DEV Community

Discussion on: Virtualenv(pipenv) in Docker?

Collapse
 
nicolaerario profile image
Nicola Erario • Edited

Docker is already a 'virtualization', so why use virtualenvs in it?
locally I use poetry (similar to pipenv but better imho): normally I generate a requirements.txt (with hashes) with poetry, pass it into container and then run pip install -r requirements.txt
EDIT: otherwise, if I remember well, you can pass to the container yaml also the pipfile.lock and then install dependencies, but, as said, I don't use pipenv

Collapse
 
jaakofalltrade profile image
Jaako

Docker is already a 'virtualization', so why use virtualenvs in it?

That is also what I am thinking, I am already passing requirements.txt to the container and pip installing it. But the thing is that I am the one who manages the package, I am the one who adds and removes packages from the requirements.txt.

Anyway thank you for your recommendation, I really appreciate it.