docker version
prints:
Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a
docker-compose --version
prints:
docker-compose 1.2.0
I installed docker with apt-get install docker.io
and docker-compose with
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
I use Ubuntu 14.04 x64.
Checkout the environment variable COMPOSE_API_VERSION.
I was getting ERROR: client and server don't have same version (client : 1.19, server: 1.18)
, then I did export COMPOSE_API_VERSION=1.18
and problem sovled!
This is an issue of docker API version used by docker-compose being higher than that that of docker daemon listening to serve.
Easiest way to fix is this to use an older version of docker-compose.
Here is my example but with different version mismatch:
$ docker-compose up
client and server don't have same version (client : 1.18, server: 1.17)
To fix it, I had to install a lower version of docker-compose(1.2 version instead of latest 1.3 version) using following command
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose``
chmod +x /usr/local/bin/docker-compose`
You can find different version of docker-compose at https://github.com/docker/compose/releases
Based on your server version, you need to try different lower versioned docker-compose until one works.
I think you just need to use a newer version of Docker. Presumably client version 1.14 is used internally in Compose.
Uninstall the apt-get version and follow the instructions on the Docker website to install Docker:
wget -qO- https://get.docker.com/ | sh
I tried a lot of solution but when I used sudo apt-get upgrade docker-engine
I see message that I have installed docker with different name as docker-ce
. After I fixed with sudo apt-get upgrade docker-ce
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With