gpt4 book ai didi

docker-compose - 执行脚本 docker-compose 失败

转载 作者:行者123 更新时间:2023-12-04 11:06:21 28 4
gpt4 key购买 nike

我使用 mac 10.11.6 El capitan 并安装了 docker 工具箱,我正在尝试使用 docker compose build 选项,但我抛出一些错误如下,

kj$ docker-compose -f docker-compose-dev.yml build
Traceback (most recent call last):
File "docker-compose", line 6, in <module>
File "compose/cli/main.py", line 71, in main
File "compose/cli/main.py", line 124, in perform_command
File "compose/cli/command.py", line 41, in project_from_options
File "compose/cli/command.py", line 113, in get_project
File "compose/config/config.py", line 380, in load
File "compose/config/config.py", line 380, in <listcomp>
File "compose/config/config.py", line 513, in process_config_file
File "compose/config/config.py", line 221, in get_service_dicts
File "distutils/version.py", line 46, in __eq__
File "distutils/version.py", line 337, in _cmp
TypeError: '<' not supported between instances of 'str' and 'int'
[83046] Failed to execute script docker-compose

yml 文件内容
version: '3.3'

services:

users:
build:
context: ./
dockerfile: Dockerfile-dev
volumes:
- './:/usr/src/app'
ports:
- 5001:5000
environment:
- FLASK_APP=project/__init__.py
- FLASK_ENV=development

不知道是什么原因导致这个问题,请给点建议,谢谢

最佳答案

这个问题的答案很简单,今天早上发生在我身上。当我完成我的项目时,我关闭了 Mac 的 docker 应用程序(主要是错误说它无法获取 Docker 和/或 docker-compose 的 API 版本)。
确保您的桌面版 Docker 正在运行,其他一切都应该恢复正常。 Check this image to see if docker desktop is running.

关于docker-compose - 执行脚本 docker-compose 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55072179/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com