如何在将 "docker-desktop-data" 发行版移动到其他驱动器后修复 Windows 版 Docker



我已经移动了" docker-desktop-data ";分发到其他驱动器上,这样我就可以节省C:驱动器上的一些空间(根据这个答案:更改Docker本地映像在Windows 10 Pro上的位置)

现在,它需要相当多的努力来实现,因为不知何故我的wsl.exe实用程序不是最新版本,所以我还发出wsl --update命令,这没有修复wsl.exe的事情,但我的内核版本(到5.10.102.1)

现在,当我尝试启动Docker Desktop时,它总是失败,当尝试启动Ubuntu 20.04时,错误状态为1;分布。我认为对应的日志是这个,来自com.docker.wsl-distro-proxy.exe.log:

[2022-11-24T12:42:27.374340900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] start wsl integration for distro Ubuntu-20.04
[2022-11-24T12:42:27.393311500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c mkdir -p ~/.docker/run
[2022-11-24T12:42:27.537095600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat ~/.docker/config.json
[2022-11-24T12:42:27.661945100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat - > ~/.docker/config.json
[2022-11-24T12:42:27.819710300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c mkdir -p ~/.docker/scan
[2022-11-24T12:42:27.959545200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat ~/.docker/scan/config.json
[2022-11-24T12:42:28.117427400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat - > ~/.docker/scan/config.json
[2022-11-24T12:42:28.255793600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e whoami
[2022-11-24T12:42:28.396517000Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e sh -c ( addgroup docker || true ) && addgroup "ubuntu" docker
[2022-11-24T12:42:28.661079900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:28.803221100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:28.957198100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-context-store /mnt/c/Users/kiril/.docker/contexts
[2022-11-24T12:42:29.441060600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:29.579920500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:29.736527200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-home-subdir /mnt/c/Users/kiril/.aws
[2022-11-24T12:42:29.969759900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:30.171491100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:30.313282300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-home-subdir /mnt/c/Users/kiril/.azure
[2022-11-24T12:42:30.469372600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:30.639436100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:30.781512500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-file /mnt/c/Users/kiril/.docker/features.json ~/.docker/features.json
[2022-11-24T12:42:30.969017400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c echo $HOME
[2022-11-24T12:42:31.141717400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing CLI API server running at /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T12:42:31.142718300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c ps -x
[2022-11-24T12:42:31.296752800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e ls /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T12:42:31.421513100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Existing cli api socket file /home/ubuntu/.docker/run/docker-cli-api.sock, trying to clean it
[2022-11-24T12:42:31.421767700Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e rm /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T12:42:31.577499100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Starting WSL Distro proxy 2
[2022-11-24T12:42:31.578030400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T12:42:31.716483400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e /mnt/wsl/docker-desktop/docker-desktop-user-distro proxy --distro-name Ubuntu-20.04 --docker-desktop-root /mnt/wsl/docker-desktop
[2022-11-24T12:42:35.350733600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Starting distro cli api server on /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T12:42:35.350733600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e docker serve --address unix:///home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T13:31:32.322148200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] kill integration processes for distro Ubuntu-20.04
[2022-11-24T13:31:32.325150200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c echo $HOME
[2022-11-24T13:31:32.460391900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing WSL CLI API server
[2022-11-24T13:31:32.460391900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing CLI API server running at /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T13:31:32.460391900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c ps -x
[2022-11-24T13:31:32.583025500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c kill 163
[2022-11-24T13:31:32.705837500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing WSL Distro proxy
[2022-11-24T13:31:32.706127000Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e sh -c kill $(cat /run/docker-desktop-proxy.pid)
[2022-11-24T13:31:32.783987200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] docker-desktop-user-distro proxy has exited
[2022-11-24T13:31:32.785747500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing WSL CLI API server
[2022-11-24T13:31:32.785747500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing CLI API server running at /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-24T13:31:32.786271600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c ps -x
[2022-11-24T13:31:32.830106900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-24T13:31:32.906859400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing WSL Distro proxy
[2022-11-24T13:31:32.907390800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e sh -c kill $(cat /run/docker-desktop-proxy.pid)
[2022-11-24T13:31:32.966910300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e /mnt/wsl/docker-desktop/docker-desktop-user-distro --docker-desktop-root /mnt/wsl/docker-desktop --distro-name Ubuntu-20.04 cleanup-cli-tools
[2022-11-24T13:31:33.045074400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][W] Distro Proxy Kill error: exit status 2
[2022-11-24T13:31:33.047074200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] exit wsl integration for distro Ubuntu-20.04
[2022-11-27T14:15:15.985672600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] start wsl integration for distro Ubuntu-20.04
[2022-11-27T14:15:16.042673200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c mkdir -p ~/.docker/run
[2022-11-27T14:15:16.290054800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat ~/.docker/config.json
[2022-11-27T14:15:16.504684200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat - > ~/.docker/config.json
[2022-11-27T14:15:16.641020800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c mkdir -p ~/.docker/scan
[2022-11-27T14:15:16.796515600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat ~/.docker/scan/config.json
[2022-11-27T14:15:16.974282900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c cat - > ~/.docker/scan/config.json
[2022-11-27T14:15:17.113074000Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e whoami
[2022-11-27T14:15:17.264607600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e sh -c ( addgroup docker || true ) && addgroup "ubuntu" docker
[2022-11-27T14:15:17.545120200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:17.666517400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:17.784434800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-context-store /mnt/c/Users/kiril/.docker/contexts
[2022-11-27T14:15:17.891515000Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][W] Error while syncing context store: cli contexts not resynced: exit status 1
[2022-11-27T14:15:17.892083000Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:18.003329300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:18.131591800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-home-subdir /mnt/c/Users/kiril/.aws
[2022-11-27T14:15:18.251977800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][W] Error while syncing ~/.aws: path .aws not synced: exit status 1
[2022-11-27T14:15:18.251977800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:18.385706700Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:18.507039300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-home-subdir /mnt/c/Users/kiril/.azure
[2022-11-27T14:15:18.668468900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][W] Error while syncing ~/.azure: path .azure not synced: exit status 1
[2022-11-27T14:15:18.668976100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:18.797046800Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:18.943141200Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e /mnt/wsl/docker-desktop/docker-desktop-user-distro sync-file /mnt/c/Users/kiril/.docker/features.json ~/.docker/features.json
[2022-11-27T14:15:19.087599400Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][W] Error while syncing ~/.docker/features.json: syncing windows path /mnt/c/Users/kiril/.docker/features.json to ~/.docker/features.json: exit status 1
[2022-11-27T14:15:19.090926900Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c echo $HOME
[2022-11-27T14:15:19.222961500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Killing CLI API server running at /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-27T14:15:19.222961500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e sh -c ps -x
[2022-11-27T14:15:19.350483000Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e ls /home/ubuntu/.docker/run/docker-cli-api.sock
[2022-11-27T14:15:19.465630300Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] Starting WSL Distro proxy 2
[2022-11-27T14:15:19.466137600Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -e cat /etc/wsl.conf
[2022-11-27T14:15:19.590681100Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][I] wsl.exe -d Ubuntu-20.04 -u root -e /mnt/wsl/docker-desktop/docker-desktop-user-distro proxy --distro-name Ubuntu-20.04 --docker-desktop-root /mnt/wsl/docker-desktop
[2022-11-27T14:15:19.708182500Z][com.docker.wsl-distro-proxy.exe for Ubuntu-20.04][F] Proxy error: exit status 1

有没有办法解决这个问题,而不重新安装整个东西(我担心,这将安装所有的东西在C:,所以我又回到了起点:()?

我建议将所有带有目录连接的默认安装位置更改为另一个文件夹,例如:

mklink /J source_dir target_dir
mklink /J "C:Program FilesDocker" "D:DockerProgramFiles"

注意目标目录应该在命令执行之前创建,源目录不应该存在,据我所知,这是您目前的情况,因为您已经移动了文件夹

否则,任何修改(在注册表中)将在Docker更新后被还原。

最新更新