Help us understand the problem. What is going on with this article?

「client and server don't have same version (client : 1.19, server: 1.18) 」って怒られたら

More than 3 years have passed since last update.

Amazon Linux 2015.03でdockerとdocker-composeをインストールして、docker-compose buildとすると、以下の様なエラーが発生した。

$ docker-compose build

datastore uses an image, skipping
redis uses an image, skipping
mysql uses an image, skipping
Building rails...
client and server don't have same version (client : 1.19, server: 1.18)

dockerのバージョン

$ docker version

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

docker-composeのバージョン

docker-compose version
docker-compose version: 1.4.0
docker-py version: 1.3.1
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1k-fips 8 Jan 2015

原因

docker-compose 1.4.0からは、docker 1.7を必要としているが、yum install dockerでインストールされるdockerのバージョンが1.6.2なのが問題のらしい。
https://github.com/docker/compose/issues/1895

上記のリンクで書かれているように、環境変数のCOMPOSE_API_VERSIONにバージョンを指定すれば解決する。

export COMPOSE_API_VERSION=1.18
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away