[root@localhost service]# docker-compose up mq
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 121, in perform_command
File "compose/cli/command.py", line 40, in project_from_options
File "compose/cli/command.py", line 110, in get_project
File "compose/config/config.py", line 394, in load
File "compose/config/config.py", line 490, in load_services
File "compose/config/config.py", line 469, in build_services
File "compose/config/config.py", line 462, in build_service
File "compose/config/config.py", line 834, in finalize_service
File "compose/config/config.py", line 646, in resolve_environment
File "compose/config/environment.py", line 36, in env_vars_from_file
File "codecs.py", line 699, in next
File "codecs.py", line 630, in next
File "codecs.py", line 545, in readline
File "codecs.py", line 492, in read
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa3 in position 0: invalid start byte
Failed to execute script docker-compose
这个报错总结下来就是自己坑自己!检查文件(包括yml文件和环境引用文件如env文件)字符编码,把中文编码字符改了,不要含有!
细心点,尤其是“:,(,)”这些字符,不容易察觉!