I'm trying to figure out how to run development builds of docker and docker-compose together on Ubuntu 14.10 to hopefully address a bug: https://github.com/docker/compose/pull/1349
Latest Docker development version
docker -v
# Docker version 1.7.0-dev, build 6a7a757
# docker-compose -v
docker-compose version: 1.3.0rc3
CPython version: 2.7.8
OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
But docker doesn't like the server version
# which docker
/usr/bin/docker
# sudo /usr/bin/docker -d &
WARN[0000] Your kernel does not support swap memory limit.
INFO[0000] Loading containers: start.
.......................................................................INFO[0000] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers : [nameserver 8.8.8.8 nameserver 8.8.4.4]
INFO[0000] No non-localhost DNS nameservers are left in resolv.conf. Using default external servers : [nameserver 8.8.8.8 nameserver 8.8.4.4]
WARN[0000] Failed to allocate and map port 8080: Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use
INFO[0000] Loading containers: done.
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=6a7a757 execdriver=native-0.2 graphdriver=aufs version=1.7.0-dev
# ps auxf | grep docker
root 24854 0.0 0.0 73360 3800 pts/14 S 09:59 0:00 | \_ sudo /usr/bin/docker -d
root 24866 0.0 0.1 439152 19556 pts/14 Sl 09:59 0:00 | | \_ /usr/bin/docker -d
root 24982 0.0 0.0 109264 14584 pts/14 Sl 09:59 0:00 | | \_ docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 32768 -container-ip 172.17.0.2 -container-port 29015
root 25102 0.0 0.1 109264 16552 pts/14 Sl 09:59 0:00 | | \_ docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 32769 -container-ip 172.17.0.2 -container-port 28015
root 25131 0.0 0.0 109264 14516 pts/14 Sl 09:59 0:00 | | \_ docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 32770 -container-ip 172.17.0.2 -container-port 8080
# docker ps
Error response from daemon: client and server don't have same version (client : 1.20, server: 1.15)
And the current development release candidate docker-compose expects server version 1.18
# which docker-compose
/usr/local/bin/docker-compose
# docker-compose ps
client and server don't have same version (client : 1.18, server: 1.15)
Even after stopping the daemon, I still get the same error message
# sudo killall docker
INFO[0288] Processing signal 'terminated'
# docker ps
Error response from daemon: client and server don't have same version (client : 1.20, server: 1.15)
I know I can downgrade the docker client to match version 1.18 which docker-compose requires, but I still don't understand why the server version is reporting as 1.15 when the same binary client appears to be 1.20.
Supplemental question: how is the docker client still receiving an incorrect server version message when the docker daemon is stopped?
Best Answer
Try restarting the docker service after upgrading Docker (
sudo service docker restart
). That may be the cause of:I had a very similar issue, ugraded Docker, and kept running into the same error message until I restarted the service.