问题描述
在使用docker-compose up –d命令行启动时出现如下错误:
Traceback (most recent call last):
File "bin/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 385, in load
File "compose/config/config.py", line 385, in <listcomp>
File "compose/config/config.py", line 518, in process_config_file
File "compose/config/config.py", line 226, 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'
[3745] Failed to execute script docker-compose
解决方法
日志显示是docker-compose的启动问题,docker-compose.yml中version指的是docker-compose的版本而非dgraph的版本,本人新手将其误以为是dgraph的版本而发生错误
version:"3"