简体   繁体   中英

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. In the past it works fine with a [path-to-project]/.ddev/docker-compose.environment.yaml, set my username to "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
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

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?

enter image description here

Fix the utf-8 Problem:

Overwrite the name in the [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:

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.

Omit the ddev-ssh-agent

Add my configuration to the config, create new file [path-to-project]/.ddev/config.user.yaml:

omit_containers: [ddev-ssh-agent]

Clear restart needed for ddev

So after that, I had some issues to get it working again. I did ddev poweroff and then 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.

After that, ddev start works again.

Thank you so much @rfay for your help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM