瑶台月下逢 2022-06-08 20:05 采纳率: 0%
浏览 379
已结题

docker compose的版本不能达到docker compose.yml文件要求的版本

“/docker compose.yml”中的版本要求为2.0或3.4,但我的docker compose的版本值Ubuntu16.04里面用“apt-get install”命令最高只能更新到1.18.0版本,造成版本不匹配错误。
docker-compose pull
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a version of "2" (or "2.0") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.

For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

1.更改“docker-compose.yml”里面“services”的值,但改了就出错;

2.更新docker-compose的版本,但只能更新到1.8.0版本;
3.根据提示将“docker-compose.yml”放到根目录,然后屏蔽里面的“services”,会造成
ERROR: The Compose file './../../../docker-compose.yml' is invalid because:
Unsupported config option for x-common-env-variables: 'Clients_Notifications_Host'
Unsupported config option for services: 'app-service-rules'
Unsupported config option for volumes: 'db-data'
Unsupported config option for networks: 'edgex-network'
services.command contains an invalid type, it should be a string, or an array

可以正常执行“docker-compose pull”命令,拉取服务镜像
  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 6月16日
    • 创建了问题 6月8日

    悬赏问题

    • ¥15 编辑cmake lists 明明写了project项目名,但是还是报错怎么回事
    • ¥15 关于#计算机视觉#的问题:求一份高质量桥梁多病害数据集
    • ¥50 如何将脑的图像投影到颅骨上
    • ¥15 提问一个关于vscode相关的环境配置问题,就是输入中文但是显示不出来,代码在idea可以显示中文,但在vscode不行,不知道怎么配置环境
    • ¥15 netcore使用PuppeteerSharp截图
    • ¥20 这张图页头,页脚具体代码该怎么写?
    • ¥15 关于#sql#的问题,请各位专家解答!
    • ¥20 WPF MVVM模式 handycontrol 框架, hc:SearchBar 控件 Text="{Binding NavMenusKeyWords}" 绑定取不到值
    • ¥15 需要手写数字信号处理Dsp三个简单题 不用太复杂
    • ¥15 数字信号处理考试111