Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Disabling TLS does no work #589

Closed
vrischmann opened this issue Oct 23, 2014 · 5 comments
Closed

Disabling TLS does no work #589

vrischmann opened this issue Oct 23, 2014 · 5 comments

Comments

@vrischmann
Copy link

Hi,

I need to disable TLS because of a 3rd party app which connects to Docker without TLS support. I tried following the procedure in the README, but it's not working.

I added DOCKER_TLS=no to /var/lib/boot2docker/profile, but now when I restart the VM with boot2docker restart docker doesn't run anymore. This is what I can find in the file /var/log/docker.log:

/usr/local/bin/docker -d -D -g "/var/lib/docker" -H unix:// -H tcp://0.0.0.0:2375 no --tlscacert=/var/lib/boot2docker/tls/ca.pem --tlscert=/var/lib/boot2docker/tls/server.pem --tlskey=/var/lib/boot2dock
er/tls/serverkey.pem >> "/var/lib/boot2docker/docker.log"
Usage: docker [OPTIONS] COMMAND [arg...]`

Clearly it's wrong, maybe the README isn't up to date ?

@tianon
Copy link
Contributor

tianon commented Oct 23, 2014

The intention was for this to work in 1.3.0, but due to an unfortunate bug it did not. The actual fix is in master, and will be released with 1.3.1.

@vrischmann
Copy link
Author

Oh, ok, I didn't think of that. Fortunately the 3rd party app I use is updated to work with TLS, so it's all good in the end.

Thanks !

@carmstrong
Copy link

Any timeline on a release with this fix?

@justquick
Copy link

@vrischmann it seems that docker is still trying to load your tls certs. i was able to get a work around functioning by modifying the /etc/init.d/docker init script on the vm and removing /var/lib/boot2docker/profile entirely.

--- /etc/init.d/docker
+++ /etc/init.d/docker-no-tls
@@ -6,7 +6,7 @@
 test -f '/var/lib/boot2docker/profile' && . '/var/lib/boot2docker/profile'

 : ${DOCKER_HOST:='-H tcp://0.0.0.0:2375'}
-: ${DOCKER_TLS:=auto}
+: ${DOCKER_TLS:=''}
 : ${DOCKER_STORAGE:=auto}
 : ${DOCKER_DIR:=/var/lib/docker}
 : ${DOCKER_ULIMITS:=1048576}

then run sudo /etc/init.d/docker restart on the vm and then boot2docker -v up on your computer. make sure to clear out any of the tls related env vars by running unset DOCKER_TLS_VERIFY DOCKER_CERT_PATH on your computer (you should only need to set DOCKER_HOST to make it work w/o tls). if everything is happy, you should b able to see info by running docker info on your computer.

@heph
Copy link

heph commented Jun 10, 2015

In case anyone else comes across this, use 'export' in the profile:

export DOCKER_TLS=no

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants