Replies: 1 comment 1 reply
-
@CalianDos to use the python in a container you should probably be volume mapping your project in the container and use it. You could also use the docker container extension and work with the python in the container. Streaming, python script to a server has a problem that basic imports won't work. The container will not be able to find modules from your working directory which is not in the container. Moving this to discussions as this better fits there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to connect to a python interpreter running inside of a docker container instead of my host machine.
Did some initial experiments by making a script:
And telling vscode that was my python interpreter. It failed at the first hurdle and by looking in the output I can see that this is due to the fact that the extension calls the python interpreter with file paths which of course don't exist in the container:
So I know it would be theoretically possible to pipe scripts into python instead of using those paths which would make it compatible with docker, but I understand that might be quite the undertaking. Am I totally out to lunch here? Or anyone have any other bright ideas?
Beta Was this translation helpful? Give feedback.
All reactions