You can build a container with Dockerfile
in a few seconds. Then why do people need to install a virtual enviroment inside the docker container?
It's like a "virtual machine" in a virtual machine ?
While Docker provides an isolated environment for your Python application, you're better off by using virtualenv (or your tool of choice) nevertheless. It can help you to maintain control over your Python environment & dependencies.
virtualenv is a tool for creating isolated Python environments containing their own copy of python , pip , and their own place to keep libraries installed from PyPI. It's designed to allow you to work on multiple projects with different dependencies at the same time on the same machine.
Docker is popular virtualization software that helps its users in developing, deploying, monitoring, and running applications in a Docker Container with all their dependencies.
Advantages of Docker Containers Docker containers are process-isolated and don't require a hardware hypervisor. This means Docker containers are much smaller and require far fewer resources than a VM. Docker is fast. Very fast.
I am working with virtualenvs in Docker and I think there are several reasons:
I think these are all reasonably good reasons to add a little pip install virtualenv
at the end of the installation! :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With