1

Tried re-installing boot2docker with brew, but getting the same problem. Below is a screen grab of the commands I ran. Anyone have any idea what can be wrong?

==> Checking out tag v1.3.0
==> go get -d
==> make goinstall
  /usr/local/Cellar/boot2docker/1.3.0: 2 files, 7.2M, built in 3 seconds


~ » boot2docker init                                                                                   wg@wg-MacBook-Pro
------------------------------------------------------------
~ » boot2docker up                             
wg@wg-MacBook-Pro
Waiting for VM and Docker daemon to start...
.....................ooooooooooooooooo
Started.
Writing /Users/wg/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/wg/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/wg/.boot2docker/certs/boot2docker-vm/key.pem

To connect the Docker client to the Docker daemon, please set:
    export DOCKER_CERT_PATH=/Users/wg/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1

------------------------------------------------------------
~ » export DOCKER_CERT_PATH=/Users/wgillmer/.boot2docker/certs/boot2docker-vm 
wg@wg-MacBook-Pro
------------------------------------------------------------
~ » export DOCKER_TLS_VERIFY=1
wg@wg-MacBook-Pro
------------------------------------------------------------
~ » docker ps
wg@wg-MacBook-Pro
Password:
2014/10/22 20:52:08 Get http:///var/run/docker.sock/v1.15/containers/json: malformed HTTP status code "/v1.15/containers/json"
------------------------------------------------------------
~ »

Deleting my .boot2docker directory and re-running a init to get a new download and then a up seems to give the same results.

~ » boot2docker destroy 
wg@wg-MacBook-Pro
------------------------------------------------------------
~ » rm -Rfv ./.boot2docker
 wg@wg-MacBook-Pro
./.boot2docker/boot2docker.iso
./.boot2docker/certs/boot2docker-vm/ca.pem
./.boot2docker/certs/boot2docker-vm/cert.pem
./.boot2docker/certs/boot2docker-vm/key.pem
./.boot2docker/certs/boot2docker-vm
./.boot2docker/certs
./.boot2docker
------------------------------------------------------------
~ » boot2docker init 
wg@wg-MacBook-Pro
Latest release for boot2docker/boot2docker is v1.3.0
Downloading boot2docker ISO image...
Success: downloaded 

https://github.com/boot2docker/boot2docker/releases/download/v1.3.0/boot2docker.iso
    to /Users/wg/.boot2docker/boot2docker.iso
------------------------------------------------------------
~ » boot2docker up 
wg@wg-MacBook-Pro
Waiting for VM and Docker daemon to start...
.....................ooooooooooooooooo
Started.
Writing /Users/wg/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/wg/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/wg/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

------------------------------------------------------------
~ » docker ps 
wg@wg-MacBook-Pro
Password:
2014/10/22 21:04:20 Get http:///var/run/docker.sock/v1.15/containers/json: malformed 
HTTP status code "/v1.15/containers/json"
------------------------------------------------------------
~ »
daemonza
  • 527
  • 5
  • 16

2 Answers2

3

I learned that if you don't add these to your shell's rc file, it can resuld in docker client spitting out malformed json error messages:

export DOCKER_CERT_PATH=/Users/sindhus/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1

I made the mistake of just adding export DOCKER_HOST=tcp://192.168.59.104:2376 and trying to run docker ps etc commands.

Hope this helps!

Sindhu S
  • 942
  • 1
  • 10
  • 23
  • is there a way to not have to type out the 3 export commands that it list? Why doesn't it just run that automatically for us? – Daniel Sikes May 21 '15 at 03:55
2

Why is docker ps asking you for a password?

It looks like docker may be aliased to sudo docker (or you're actually running sudo docker ps), which would mean your docker environment vars aren't set correctly.

See this answer for a full explanation.

Community
  • 1
  • 1
Chris McKinnel
  • 14,694
  • 6
  • 64
  • 67
  • Cannot believe that I did not catch that. I git cloned by linux workstation's zshrc file in the morning to my macbook, and in that file I have a alias docker="sudo docker" – daemonza Oct 23 '14 at 07:37