Pycharm docker remote python interpreter

匿名 (未验证) 提交于 2019-12-03 08:59:04

问题:

When trying to configure a Remote Python Interpreter in Pycharm using Docker I get the following error:

com.github.dockerjava.api.excepion.DockerClientException: Enabled TLS verification (DOCKER_TLS_VERIFY=1) but certificate path (DOCKER_CERT_PATH) '/Users/me/.docker/machine/machines/default' doesn't exist.

I've $export DOCKER_TLS_VERIFY=0 but with no difference. I've manually created '/Users/me/.docker/machine/machines/default' but with no joy.

I've deinstalled and reinstalled both Docker and Pycharm but still get the same error.

I'm on a Mac OSX 10.12.1 Pycharm 2016.3

Full disclosure: I use vagrant and virtual box on my mac too.

Any pointers would be appreciated. Kevin

回答1:

I fixed it as follows:-

Obtain socat (if not already installed)

e.g.: brew install socat

then: socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock

Then in pycharm/docker config: Api url: tcp://localhost:2375

many thanks to the following found on: https://youtrack.jetbrains.com/issue/IDEA-153973



回答2:

If you have been using docker-machine for Mac to support PyCharm or the "socat" hack to access Docker API - It is no longer necessary with PyCharm EAP (https://www.jetbrains.com/pycharm/nextversion/

There is a no-questions-asked 30 day trial of EAP before that update goes live (some time this month)



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!