[英]docker ddev .UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte
I'm currently running in such a tricky error.我目前正在运行一个如此棘手的错误。 I'm running ddev on Windows 10. It seems, the problem is my name "André Kraus", because of the "é" inside.
我在 Windows 10 上运行 ddev。看来,问题是我的名字“André Kraus”,因为里面有“é”。 In the past it works fine with a [path-to-project]/.ddev/docker-compose.environment.yaml, set my username to "andrekraus"
过去它与 [path-to-project]/.ddev/docker-compose.environment.yaml 一起工作正常,将我的用户名设置为“andrekraus”
version: '3.6'
services:
web:
build:
args:
username: andrekraus
db:
build:
args:
username: andrekraus
But since yesterday, there occurs a new challenge.但从昨天开始,出现了新的挑战。 When I type in ddev start it ends up with:
当我输入 ddev start 时,它以:
$ ddev start
Starting ddev-test-4...
.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte
Failed to start ddev-test-4: failed to start ddev-ssh-agent: Failed to run docker-compose [-f C:\Users\André Kraus/.ddev/.ssh-auth-compose-full.yaml -p ddev-ssh-agent up --build --force-recreate -d], err='exit status 1', stdout='', stderr='.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 235: invalid continuation byte'
I tried to fix that in my docker-compose.environment.yaml with我试图在我的 docker-compose.environment.yaml 中修复它
version: '3.6'
services:
web:
build:
args:
username: andrekraus
db:
build:
args:
username: andrekraus
ddev-ssh-agent:
build:
args:
username: andrekraus
but this didn't effect anything.但这没有任何影响。 The problem occurs for sure in the C:\\Users\\André Kraus.ddev.ssh-auth-composer-full.yaml (screenshot) in my user directory, but how can I manage the settings there?
问题肯定出现在我的用户目录中的 C:\\Users\\André Kraus.ddev.ssh-auth-composer-full.yaml(屏幕截图)中,但是我如何管理那里的设置?
Overwrite the name in the [path-to-project]/.ddev/docker-compose.env.yaml:覆盖 [path-to-project]/.ddev/docker-compose.env.yaml 中的名称:
version: '3.6'
services:
web:
build:
args:
username: andrekraus
db:
build:
args:
username: andrekraus
Then in ~/.ddev (in my example on Windows it is C:\\Users\\André Kraus.ddev ) create new the file ssh-auth-compose.environment.yaml:然后在 ~/.ddev (在我在 Windows 上的示例中,它是 C:\\Users\\André Kraus.ddev )创建新文件 ssh-auth-compose.environment.yaml:
version: '3.6'
services:
ddev-ssh-agent:
build:
args:
username: andrekraus
This solves the problem with the username, but I didn't get the path working.这解决了用户名的问题,但我没有让路径工作。 So at the moment, I omit the ddev-ssh-agent.
所以目前,我省略了 ddev-ssh-agent。
Add my configuration to the config, create new file [path-to-project]/.ddev/config.user.yaml:将我的配置添加到配置中,创建新文件 [path-to-project]/.ddev/config.user.yaml:
omit_containers: [ddev-ssh-agent]
So after that, I had some issues to get it working again.所以在那之后,我遇到了一些问题才能让它再次工作。 I did
ddev poweroff
and then docker ps -a
.我做了
ddev poweroff
然后ddev poweroff
docker ps -a
。 The list shows some containers running, I had to stop them all ( docker-compose down
in the project directories) so that docker ps -a
shows an empty list.该列表显示了一些正在运行的容器,我不得不将它们全部停止(项目目录中的
docker-compose down
),以便docker ps -a
显示一个空列表。
After that, ddev start
works again.之后,
ddev start
再次工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.