Is Docker an alternative for 'virtualenv' while develping Django project?
The usage of virtualenv or docker depends on your requirement or use case.
Docker container encapsulates an entire OS and provides isolation of OS whereas a virtualenv only encapsulates Python dependencies which enables switching between Python versions and dependencies, but you are dependent with your host OS. 
Virtualenv can be used in case if you have two different projects on your machine that require two different versions of the same package with python. Typically, the virtualenv provides abstraction from OS's use of python. 
Docker enables portability from one machine to another whereas with virtualenv you will have to do the installation in another place.  Docker isolates all of the additional system dependencies too and provides a completely isolated environment.  It is containerization platform which is used to package your application and all its dependencies together in the form of containers so to make sure that your application works seamlessly in any environment which can be development or test or production. It helps to ensure that the Dev and Production environment are completely same.
A virtual environment is required when creating an application and now I am using 'virtualenv' for creating a virtual environment while developing my Django application. I heard of Docker about its virtual environment. Am I able to use Docker as an alternative to virtualenv?