Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After adding "DOCKER_TLS_VERIFY": false to docker daemon configuration file can't start docker #38

Closed
snarb opened this issue Aug 15, 2016 · 19 comments

Comments

@snarb
Copy link

snarb commented Aug 15, 2016

Expected behavior

I want to disable DOCKER_TLS_VERIFY by adding "DOCKER_TLS_VERIFY": false to docker daemon configuration file

Actual behavior

Dacker failed to start

Information

Win10 ver 1607
Docker 1.12: 5968

@rn
Copy link
Contributor

rn commented Aug 15, 2016

DOCKER_TLS_VERIFY is a environment variable and not a docker daemon config file options. See: https://docs.docker.com/engine/reference/commandline/dockerd/#/daemon-configuration-file for the documentation. I suspect you might want to use "tlsverify": false,

@snarb
Copy link
Author

snarb commented Aug 16, 2016

log-2016-08-15_16-53-40.zip

The same with "tlsverify": false. Docker can't start any more. Typically when the user input incorrect value program just returs message to the user and ignore that setting, not fail to start.

Other issue, if "tlsverify": false not working - how can I disable tls verification in windows? Look like it is enabled by default and makes other programs like PyCharm fail to use daemon API. For instance I am starting container with "docker run -e DOCKER_TLS_VERIFY=0 -it -p 8888:8888 tensorflow/tensorflow" but still got error from PyCharm "Enabled TLS verification (DOCKER_TLS_VEROFY=1) but certificate path (DOCKER_CERT_PATH) 'C:\xxx' doesn't exits".. so looks like I can't pass -e DOCKER_TLS_VERIFY=0. What should I do to disable it?

@rn
Copy link
Contributor

rn commented Aug 16, 2016

Ah, it turns out that if you specify "tlsverify": false to the config file, the daemon expects tlscert and tlskey to be set as well.

Stepping back, what is the issue you are trying to solve?

@snarb
Copy link
Author

snarb commented Aug 16, 2016

I want do disable tls verification because PyCharm(Python IDE) when i want to connect remotly to container using docker API see that DOCKER_TLS_VERIFY is true but DOCKER_CERT_PATH doesn't exits and fails to connect. I want to solve this.

@rn
Copy link
Contributor

rn commented Aug 30, 2016

can you try as suggested on this forum post: https://forums.docker.com/t/how-to-find-the-remote-api/20988

@dgageot
Copy link
Member

dgageot commented Sep 1, 2016

@pkonovalov-softheme I think you used to use docker machine and now use Docker for Windows. Right?

What's happening is that your shell is configured with the DOCKER_TLS_VERIFY set to true so the python docker api thinks it should connect to the docker daemon with TLS.

I think the solution is not to change the daemon configuration but to unset the DOCKER_TLS_VERIFY and all the other all the DOCKER_* env variables in your shell profile.

@dgageot
Copy link
Member

dgageot commented Sep 5, 2016

Hi @pkonovalov-softheme, did you manage to solve your issue? I'd like to close this issue since I don't think there's a bug here but I want to be sure that it's ok with you.

@thesnarb
Copy link

thesnarb commented Sep 5, 2016

HI @dgageot! Thanks! Sorry, but I don't know because after this problems I started using bash on Win10 for my task instead of Docker :( You can close.

@dgageot
Copy link
Member

dgageot commented Sep 5, 2016

@thesnarb Thanks for the feedback. I'm going to close the issue then!

@dgageot dgageot closed this as completed Sep 5, 2016
@keithsmith5150
Copy link

@dgageot I'm very new to pycharm. (new to python as well)

I've tried finding DOCKER_TLS_VERIFY with no luck. Can you point me in the right direction?

Thanks

@chananshgong
Copy link

Waiting for a solution. I would like to connect to docker using PyCharm in windows and fail to do so as well.

@waza-ari
Copy link

I basically have the same problem, did not find a solution yet. Would be interested if someone find a solution to natively use dockerized python containers on OS X with PyCharm.

@chanansh
Copy link

Managed to solve this by using the native engine rather than the old docker-machine way. See stackoverflow question here:

Since I had a failry hard time getting the remote interpreter running, here is the short version for those using 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later) as specified here: https://docs.docker.com/engine/installation/windows/#/docker-for-windows And in the future hopefully all recent Windows 10 versions.

There is no need to fiddle around with the docker-machine. When Docker is up and running: 1. Make sure you share the C drive between Docker and your local machine 2. When specifying the remote interpreter set tcp://localhost:2375 as API URL. That’s it.

Credit: Markus at this blog post comments: https://blog.jetbrains.com/pycharm/2015/12/using-docker-in-pycharm/#comment-296772

@waza-ari
Copy link

I am also using the native engine, but got the same problem there. Using tcp://localhost:2376 or tcp://localhost:2375 results in a connection refused message. Not sure how to configure this at all using OS X. This however has nothing to do with this original topic, so I am going to ask somewhere else.

@chananshgong
Copy link

chananshgong commented Jan 31, 2017 via email

@reinoud
Copy link

reinoud commented Mar 24, 2017

@waza-ari After looking for a day on how to get it working I installed Pycham 2017 EAP, where you can enter unix:///var/run/docker.sock as API url. (On OSX)

(still trying to figure out how to get around the DOCKER_CERT_PATH issue; ~/.docker does not exist...)

@veuncent
Copy link

veuncent commented Apr 3, 2017

I solved this by using tcp://localhost:2375 as API URL and emptying the Certificates folder field in the Docker server settings in PyCharm 2017 Pro.

@waza-ari
Copy link

waza-ari commented May 2, 2017

@reinoud thank you, the URL worked. Additionally, I just emptied the Certificates folder as @veuncent suggested, and this finally seems to work.

@amd5 amd5 mentioned this issue Dec 3, 2019
@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests