错误而跑“泊坞窗,构成了

问题描述:

我收到错误的‘错误:客户端和服务器不具有相同的版本(客户端:1.21,服务器:1.18)’错误而跑“泊坞窗,构成了

于是我就命令”出口COMPOSE_API_VERSION = 1.18" ,现在我得到不同的错误

Traceback (most recent call last): 
File "<string>", line 3, in <module> 
File "compose/cli/main.py", line 61, in main 
File "compose/cli/main.py", line 113, in perform_command 
File "compose/cli/main.py", line 835, in up 
File "compose/project.py", line 374, in up 
File "compose/project.py", line 415, in initialize 
File "compose/network.py", line 162, in initialize 
File "compose/network.py", line 47, in ensure 
File "compose/network.py", line 82, in inspect 
File "site-packages/docker/utils/decorators.py", line 32, in wrapper 
docker.errors.InvalidVersion: inspect_network is not available for version < 1.21 
docker-compose returned -1 

我的搬运工,撰写文件可以在 gist

泊坞版本中找到:泊坞版本1.12.0,构建8eab29e

Docker-compose:docker-compose 1.8.0版,build f3628c7

Ubuntu 14.04 64bit。

任何帮助,将不胜感激。谢谢。

您正在本地运行docker(1.12)和docker-compose(1.8.0)的最新版本。错误消息意味着您可能正在远程服务器上启动容器? (开始于docker-machine?)

我建议升级在目标服务器上运行的docker版本。

关于COMPOSE_API_VERSION variable的文档声明只能用作解决方法。

Setting this variable is intended as a workaround for situations where you need to run temporarily with a mismatch between the client and server version. For example, if you can upgrade the client but need to wait to upgrade the server.

Running with this variable set and a known mismatch does prevent some Docker features from working properly. The exact features that fail would depend on the Docker client and server versions. For this reason, running with this variable set is only intended as a workaround and it is not officially supported.

If you run into problems running with this set, resolve the mismatch through upgrade and remove this setting to see if your problems resolve before notifying support.