How to connect PyCharm to a python interpreter located inside a Docker container?

前端 未结 10 2383
再見小時候
再見小時候 2021-01-30 03:40

I\'m starting with Docker, but I don\'t know how to configure PyCharm to use a python interpreter located in a container.

It was easy to setup with Vagrant, but there\'s

10条回答
  •  梦如初夏
    2021-01-30 03:51

    With PyCharm 5 they added support for docker. You must have your docker configured in docker-machine.

    If you don't already use docker-machine you can connect to an existing machine using the generic machine engine and ssh into a vagrant VM or to localhost if you aren't running things in a VM. I didn't find a way around the ssh to localhost unfortunately.

    I haven't found a way to mount volumes into the docker image they use, to share files with my dev tree, but it might be possible.

提交回复
热议问题