Ever heard about bind mounting? My current docker image for a Flask app doesn't even contains my code.
Project
Project/venv
Project/src
And then have the whole project as a volume. Then your editor can see the same files as you have in the container.