Introduction
If you had tried setting up the VSCode debugger with docker before, you might have seen that it can be a bit more complicat...
For further actions, you may consider blocking this person and/or reporting abuse
Why do we use this when we have virtual environment for python apps? I mean after all both are just techniques to isolate the app so it can run independently.
Any how cheers mate for the job well done.
Yes, they both isolate the code but they have different purposes.
The virtual env takes care of the python dependencies only, but the docker container will take care of creating the entire environment (but using your current system resources), similar to creating a virtual machine in your computer and installing all the necessary dependencies like a specific Python version for example.
This is especially good because it removes that issue of incompatible software versions between coworkers' computers and the prod, staging and dev environments.
Basically, you have a production-ready setup.
Linode has a great article about why and when to use docker, maybe this could be a good help to you:
linode.com/docs/guides/when-and-wh...
Ty you're great
Once I started using Docker, VS Code no longer recognized new packages entered in requirements.txt. The app itself worked fine, but VS code showed error messages. Is there any way to get VS code to recognize newly added packages?
"-m", "app", "--wait-for-client", "--multiprocess",
is it really necessary? it was crashing the execution today.
great tutorial
Hey Diogo!
No, this is not required, It just makes the execution of the app await for the debugger connection.
Kindly fix this
for windows
.\venv\Scripts\activateyou wrote.
./venv/Scripts/activateThis just saved my life from putting logs at random places to debug flask running in Docker.