WSL2使用docker-ce
Docker Desktop在我手上非常不稳定,经常守护进程启动失败。
于是,修改了管理进程的服务为systemd,在WSL2中安装docker-ce,就采用ubuntu上的教程(依据发行版来定)
https://docs.docker.com/engine/install/ubuntu/
https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/
安装好之后然后会出现奇奇怪怪的错误。
docker compose无法正常使用,安装过程中会将docker compose软链接到Windows。解决方案:https://github.com/docker/compose,找到对应发行版,放置在/usr/local/lib/docker/cli-plugins路径上,修改权限,改个名即可。
docker desktop卸载不赶紧导致的,error getting credentials - err: docker-credential-desktop.exe resolves to executable in current directory (./docker-credential-desktop.exe), out: ``会出现这种认证错误的情况。看到.exe就知道不知道哪个设置设置不对了。找到~/.docker/config文件,删除其中含有Desktop.exe的那一行。
希望赶紧出适配WSL2的docker-ce.