Since I just updated Docker to 1.1.0 I get:
Error response from daemon: client and server don\'t have same version (client : 1.13, server: 1.12)
<
This worked for me: It just shuts the vm down, deletes & recreates it and starts it up again. It re-runs shellinit so your ENV variables get set with the correct IP address when it comes back up.
$ boot2docker poweroff && \
boot2docker delete && \
boot2docker init && \
boot2docker up
$ eval `boot2docker shellinit`
I had the latest version of boot2docker(v1.7.1) and got the client server mismatch error. Then I just ran boot2docker upgrade
and it solved the problem.
I find the version in brew is outdated compared to the one on the docker.io website. Therefore I think the best way is go to the website and download the install file.
The correct answer here is very old (Docker have renamed boot2docker to Docker Machine and added some more functionality to it).
Anyway I faced the same problem and took me about 3 days to fix :(
Here's the solution
1) find the location of the boot2docker.iso
sudo find ~/ -name 'boot2docker.iso'
2) delete the boot2docker.iso
file, after taking a backup of it
/Users/{user}/.docker/machine/cache/boot2docker.iso
3) delete your docker vm
docker-machine rm {default}
this should delete that one as well:
/Users/{user}/.docker/machine/machines/default/boot2docker.iso
4) create new docker vm
docker-machine create --driver virtualbox default
this will download a new boot2docker.iso
first and then use it to create your vm.
Now this should fix it :)
If you get any error here like:
Running pre-create checks...
(mega-docker) No default Boot2Docker ISO found locally, downloading the latest release...
Error with pre-create check: "Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp: lookup api.github.com on 192.168.0.1:53: read udp 192.168.0.103:53947->192.168.0.1:53: i/o timeout"
try to download the boot2docker.iso
file manually by going to https://api.github.com/repos/boot2docker/boot2docker/releases/latest then clicking on the html_url
and finally choosing to download the file.
once you get the file go and place it manually in /Users/{user}/.docker/machine/cache/
finally re-run this command docker-machine create --driver virtualbox default
I had the latest version of boot2docker, docker and virtual box but was still receiving this message. It seems running brew upgrade boot2docker
isn't the best idea. When running boot2docker upgrade
, I was asked to set a bunch of environment variables and then it worked for me.
Boot2docker asked me to set these (see the last lines):
$ boot2docker upgrade
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/.../.boot2docker/boot2docker.iso
Waiting for VM and Docker daemon to start...
.........oooooooooooooo
Started.
Writing /Users/.../.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/.../.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/.../.boot2docker/certs/boot2docker-vm/key.pem
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/.../.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
It's possible to cut and paste those three lines in one go, into your terminal.
To check they are correct:
$ env
It looks like you need to upgrade the VM after installing boot2docker:
if you are upgrading from boot2docker 0.12 or later, you can update your existing virtual machine (after upgrading using the installer) using boot2docker stop && boot2docker download && boot2docker up - and you will not lose your existing data.
(https://github.com/boot2docker/osx-installer/releases/tag/v1.1.0)