I am working with virtualenvs in Docker and I think there are several reasons:
- you may want to isolate your app from system’s python packages
- you may want to run a custom version of python but still keep the system’s packages untouched
- you may need fine grain control on the packages installed for a specific app
- you may need to run multiple apps with different requirements
I think these are all reasonably good reasons to add a little pip install virtualenv at the end of the installation! 🙂