Is docker an over kill?
As you know docker containers are built from Dockerfiles.
Unlike VM's where the complete operating system is completely replicated, docker only moves the most essential libraries you need to get your app running. And so if you need the python runtime in your container, it would pull the python image with all of it's dependencies, like executables/binaries needed in C.
Just like your requirements.txt file, when you install say django-allauth, it goes ahead and installs all other dependencies it needs to function in the virtual environment you create.
So yes, in simple terms it's a virtual environment to help you run your app with only the necessary dependencies.
Okay, what if we go beyond simple terms!
Is there anything docker can do beyond simple terms?
Well that might be when you start using docker containers with an orchestrator like Docker Swarm or Kubernetes. ( Diving into microservices ).
Or use cases like Google Cloud Functions or AWS Lambda to run simple functions for users
Honestly, I don't think one needs docker, If. You're just working locally and strictly using a small/finite set libraries and dependencies, cos using docker would an overkill, like few years back I was mostly using Django, postgresql, sqlite3, redis, rabbitmq. It felt like an overkill to build and startup a container for a project that would just be deployed to heroku.
Where docker really comes in handy is in production. Maybe (as it usually is) the company have their applications running in containers the cloud, and you want to run an application locally or test something locally to get the best results you would need to an almost perfect replica of the production environment that the app is running on it the cloud. That's where docker comes in, docker can help you recreate the contain the app is running with all it's settings and dependencies on your local machine automatically just with one or few commands.
Just imagine the app is running on a Linux server and you're using several applications like postgresql, mongodb, redis, Apollo..... It would be a real pain the ass to have to install and set all these up one by one and your local machine may not even be Linux, but with docker, you can recreate an almost exact Linux server with all those dependencies locally so the application can behave the same way on your local machine as it does on the cloud.
Also, docker containers can be really helpful in security (like setting up some kind of firewall when communicating with containers)
Right. In production, you are not only considering the software stack but also costs. You also need to manage the complexity of your setup. The simpler the better. I know a company. Their software stack is RHEL, PHP, and Mysql. They use the same version of Mysql so no point in using docker. They have 200+ websites on the same server. However, they now need to upgrade MySQL. It is at this point that they are now considering docker