I'm currently trying to embed Docker into my Python development workflow for non-web applications.
What are the current best practices for developing Python using the Docker and IDE? I need the ability to isolate the environment using Docker and debug my code.
I found many articles on the Internet about using Docker to deploy your code:
- Production Deployments: How to Create Docker Images Ready for Rotation with Your Application Already Packed Inside.
- development environments that reflect production: an extension of the above, where you can use the container for a full QA of the current state of the project before deployment during development during development
I found much less about the actual development workflow, in addition to some tips on how to use containers with shared volumes mapped to directories on the host when developing web applications. This approach does not apply to non-web applications, and it has some problems when a simple reboot (with a mechanism like LiveReload) is not enough, so you need to restart the container (s).
The closest letter I could find is Eight docker development patterns , but it does not consider IDEs (for example, PyCharm I use now).
Perhaps this question is the result of 3-4 hours (and counting) of PyCharm’s settings to use the remote Python interpreter running in the Docker container. I expected much better integration between the two.