docker-compose up leads to “client and server don&

2019-01-21 22:18发布

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.

9条回答
女痞
2楼-- · 2019-01-21 22:48

Try restarting the docker service after upgrading Docker (sudo service docker restart).

I had a very similar issue, upgraded Docker, and kept running into the same error message until I restarted the service. (See https://serverfault.com/a/700707/295500.)

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-21 22:51

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!

查看更多
放我归山
4楼-- · 2019-01-21 22:52

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
查看更多
登录 后发表回答