使用docker-compose up
命令时出现以下错误:
ERROR: client is newer than server (client API version: 1.21, server API version: 1.20)
docker -v
导致:
Docker version 1.8.2, build 0a8c2e3
docker-compose -v
导致:
docker-compose version 1.6.0, build d99cad6
搬运工-compose.yml:
elasticsearch:
image: elasticsearch:latest
command: elasticsearch -Des.network.host=0.0.0.0
volumes:
- /srv/dockervolume/elasticsearch/var/lib/elasticsearch/data:/var/lib/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
logstash:
image: logstash:latest
command: logstash -f /etc/logstash/conf.d/logstash.conf
volumes:
- /srv/dockervolume/logstash/etc/logstash/conf.d:/etc/logstash/conf.d
ports:
- "5000:5000"
links:
- elasticsearch
kibana:
build: kibana:latest
ports:
- "5601:5601"
links:
- elasticsearch
我通过以下命令安装了docker-compose:
sudo apt-get -y install python-pip
sudo pip install docker-compose
答案 0 :(得分:0)
查看https://docs.docker.com/engine/reference/api/docker_remote_api/处的Docker版本/远程API版本矩阵。本质上,Docker Compose 1.6.x仅支持返回客户端版本1.21(在Docker版本1.9.x中)。您需要至少升级到Docker 1.9或将Docker Compose降级到1.5.2。