We switched to using virtualenv inside the docker image (actually using pipx) because we had dependencies incompatibilities between several python apps, some internal, some opensource. UItimately, using pipx inside the docker image isolate each apps and solve many issues, at the cost of extra space. I won't do that for a webapp for instance, but for a "toolbox" docker image it definitively helped.
Thank you for sharing your experience with us, I personally was very hesitant about using virtualenv inside a Docker image. Is there any performance issue when using a virtual environment inside a Docker container? Also, which Docker image are your images usually based on for Python projects?
We switched to using virtualenv inside the docker image (actually using pipx) because we had dependencies incompatibilities between several python apps, some internal, some opensource. UItimately, using pipx inside the docker image isolate each apps and solve many issues, at the cost of extra space. I won't do that for a webapp for instance, but for a "toolbox" docker image it definitively helped.
Thank you for sharing your experience with us, I personally was very hesitant about using virtualenv inside a Docker image. Is there any performance issue when using a virtual environment inside a Docker container? Also, which Docker image are your images usually based on for Python projects?
This is such a solid talk. Thanks for posting Cristian!