在使用laradock的时候,docker-compose up -d
运行之后进入容器使用:
docker-compose exec --user=laradock workspace bash
提示错误:
Traceback (most recent call last):
File "docker-compose", line 6, in <module>
File "compose\cli\main.py", line 72, in main
File "compose\cli\main.py", line 128, in perform_command
File "compose\cli\main.py", line 491, in exec_command
File "compose\cli\main.py", line 1469, in call_docker
File "subprocess.py", line 172, in call
File "subprocess.py", line 644, in _execute_child
TypeError: environment can only contain strings
[1160] Failed to execute script docker-compose
使用
docker exec -it --user=laradock laradock_workspace_1 bash
可以进入。
经过排查和这几天错误的情况,基本断定是换行符的问题,应该是哪个文件或者目录使用了crlf而不是lf。具体的问题暂时没时间就先这样了。
网友评论