1

Here is a very similar question. But the problem is that some people said that docker version is too old, some people said that docker version is not old enough. My question is that after I checked the version of my docker and docker-compose, I cannot find version 1.21 which is reported by the ERROR. Where can I find it?

I am trying to run Crystalnix/omaha-server.

I followed the steps:

$ sudo apt-get update
$ sudo apt-get install docker.io
$ sudo apt-get install python-paver python-pip
$ sudo pip install -U docker-compose
$ git clone https://github.com/Crystalnix/omaha-server.git
$ cd omaha-server
$ sudo paver up_local_dev_server

Then I received error:
docker-compose -f docker-compose.dev.yml -p dev up -d db ERROR: client and server don't have same version (client : 1.21, server: 1.18)

From Srini Koganti's Answer, I found that the error may be caused by docker API version used by docker-compose being higher than that that of docker daemon listening to serve.

Then I check:

docker-compose --version
docker-compose version 1.13.0, build 1719ceb

Also:

docker version
Client version: 1.6.2
Client API version: 1.18
Go version (client): go1.2.1
Git commit (client): 7c8fca2
OS/Arch (client): linux/amd64

I can found the version 1.21 nowhere, so what is the cause of this problem? And how to fix it?

sflee
  • 1,659
  • 5
  • 32
  • 63
  • 1
    Possible duplicate of [docker-compose up leads to "client and server don't have same version (client : 1.14, server: 1.12)" error but client and server have the same version](https://stackoverflow.com/questions/29727171/docker-compose-up-leads-to-client-and-server-dont-have-same-version-client) – BMitch Jun 01 '17 at 16:11
  • Yes I have read this thread but I followed a solution that is not suitable for my case. – sflee Jun 02 '17 at 00:57
  • There was more than one answer to that post. The third answer to the linked post was to upgrade docker, which you did and accepted as the answer here. – BMitch Jun 02 '17 at 01:02
  • Yes you are right, but can you give a further explanation about how do people know that the version of docker is too old? I mean I can see the Client API version is 1.18, which is higher than the error reporting. I am sorry if it is a very simple question, since I am new to docker. – sflee Jun 02 '17 at 01:07
  • 1
    As the third answer also hints at, the client version 1.21 in your case is coming from docker-compose itself. It calls the API directly rather than calling the `docker` CLI. The current version of the docker engine is tracked on their release page, though this repo is likely to change in the not too distant future: https://github.com/moby/moby/releases – BMitch Jun 02 '17 at 01:11
  • 1
    Docker's install page also walks through the recommended installation steps, which is the manual process of get.docker.com. https://docs.docker.com/engine/installation/linux/ubuntu/ – BMitch Jun 02 '17 at 01:14

1 Answers1

1

You have to upgrade your Docker version, since you have a really old version.

The easiest way to install last Docker Engine version is using official installation script of Docker.

To do this, you only have to execute this command, which will retrieve and execute the script.

wget -qO- https://get.docker.com/ | sh

kstromeiraos
  • 4,659
  • 21
  • 26
  • Thank you I removed my old docker by `sudo apt-get remove docker` then I install it by `sudo wget -qO- https://get.docker.com/ | sh`, then I have `docker --version` `Docker version 17.05.0-ce, build 89658be`, then the problem seems being solved. – sflee Jun 02 '17 at 00:58