>$ eval "$(docker-machine env default)"
>$ docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: darwin/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.3
Git commit: a34a1d5
Built: Fri Nov 20 17:56:04 UTC 2015
OS/Arch: linux/amd64
>$ docker-compose up
ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.
>$ docker-machine start default
Machine "default" is already running.
>$ docker-machine version
docker-compose version: 1.5.1
docker-py version: 1.5.0
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.2a 19 Mar 2015
docker-compose
is broken and no detailed error message is given. How to make it works?
We've seen some cases where TLS settings are causing TLS errors, which result in a bad conenction failued error.
Can you include the output of env | grep DOCKER
and docker-compose --verbose up
>$ env | grep DOCKER
DOCKER_TLS_VERIFY=1
DOCKER_HOST=tcp://192.168.99.100:2376
DOCKER_CERT_PATH=/Users/kris/.docker/machine/machines/default
DOCKER_MACHINE_NAME=default
>$ docker-compose --verbose up
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.auth.auth.load_config: Trying /Users/kris/.docker/config.json
docker.auth.auth.load_config: File doesn't exist
docker.auth.auth.load_config: Trying /Users/kris/.dockercfg
docker.auth.auth.load_config: File doesn't exist - returning empty config
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/compose/compose/cli/main.py", line 54, in main
File "/compose/compose/cli/docopt_command.py", line 23, in sys_dispatch
File "/compose/compose/cli/docopt_command.py", line 26, in dispatch
File "/compose/compose/cli/main.py", line 169, in perform_command
File "/compose/compose/cli/command.py", line 54, in project_from_options
File "/compose/compose/cli/command.py", line 91, in get_project
File "/compose/compose/cli/command.py", line 73, in get_client
File "/compose/venv/lib/python2.7/site-packages/docker/api/daemon.py", line 78, in version
File "/compose/venv/lib/python2.7/site-packages/docker/client.py", line 110, in _get
File "/compose/venv/lib/python2.7/site-packages/requests/sessions.py", line 477, in get
File "/compose/venv/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
File "/compose/venv/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
File "/compose/venv/lib/python2.7/site-packages/requests/adapters.py", line 424, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.99.100', port=2376): Max retries exceeded with url: /v1.19/version (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 403 Forbidden',)))
docker-compose returned -1
Caused by ProxyError('Cannot connect to proxy.
It looks like maybe you have some PROXY
environment variables set that are preventing you from hitting the daemon.
What's the output of env | grep PROXY
?
Close the proxy and fix.
I do have the same problem. I'm running on mac 10.11.2, installed via brew.
docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM
default * virtualbox Running tcp://192.168.99.100:2376
docker-compose -v
docker-compose version 1.5.2, build unknown
env | grep DOCKER
DOCKER_HOST=tcp://192.168.99.100:2376
DOCKER_MACHINE_NAME=default
DOCKER_TLS_VERIFY=1
DOCKER_CERT_PATH=/Users/jochenmanz/.docker/machine/machines/default
docker-compose --verbose up:
....
php_1 | [20-Dec-2015 01:45:13] NOTICE: fpm is running, pid 1
php_1 | [20-Dec-2015 01:45:13] NOTICE: ready to handle connections
php_1 | [20-Dec-2015 01:45:13] NOTICE: systemd monitor interval set to 10000ms
ERROR: compose.cli.main.main: Couldn't connect to Docker daemon - you might need to rundocker-machine start default
.
docker-compose.yml
Also getting this problem too. I had tried to setup a machine using a proxy, following this suggestion - https://github.com/docker/toolbox/issues/102#issuecomment-131715272 .
But ever since then, I get this issue with docker-compose.
I have recreated my default machine, without specifying the proxy, but it seems like the config is being held somewhere.
TIA
DOH - fixed it, I had the proxy settings set in the OSX system preferences. I guess the browser falls back to none if it cannot connect.
This is being tracked by #903
I had this problem fix with this command "export no_proxy=192.168.99.100"
after adding @dernotte solution, it didn't work for me until I added eval $(docker-machine env dev)
My machine name was dev in this case
On Windows 7, add the NO_PROXY variable to local variables (besides the internal variables of the virtual machine).
Run this in a CMD:
set NO_PROXY=%DOCKER_HOST%
Most helpful comment
I had this problem fix with this command "export no_proxy=192.168.99.100"