3👍
What's the difference between Docker and Python virtualenv?
A virtualenv only encapsulates Python dependencies. A Docker container encapsulates an entire OS.
In other words, a docker container is similar to a virtual environment except that it encapsulates its own OS instead of its own project environment. This means a virtual environment would be useless to have inside of a docker container since the environment is already encapsulated.
Source:stackexchange.com