Hi there,
I’ve gotten myself in a bit of a bad situation. I started off with Docker Desktop on windows, running docker in WSL2. I made a 2nd wsl distro (debian if it matters) and added it to docker desktop so I could talk to docker from inside of there. Then I decided to remove docker desktop and just run docker engine in WSL. So I uninstalled docker desktop and removed the docker-desktop alpine distro and then installed docker in my Debian wsl. I thought I had everything cleaned up but now when I run docker build
I get the following output:
failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-buildx: no such file or directory
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
If I check that path I see that all of my plugins are symlinks off into nothing. /mnt/wsl/docker-desktop
doesn’t exist and I’m assuming that’s a remnant from when this distro was connected to docker desktop.
$ ls -la /usr/local/lib/docker/cli-plugins/
total 48
drwxr-xr-x 2 root root 4096 Sep 16 09:20 .
drwxr-xr-x 3 root root 4096 Aug 30 10:56 ..
lrwxrwxrwx 1 root root 80 Sep 16 09:20 docker-buildx -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-buildx
lrwxrwxrwx 1 root root 81 Sep 16 09:20 docker-compose -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-compose
lrwxrwxrwx 1 root root 79 Sep 16 09:20 docker-debug -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-debug
lrwxrwxrwx 1 root root 81 Sep 16 09:20 docker-desktop -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-desktop
lrwxrwxrwx 1 root root 77 Sep 16 09:20 docker-dev -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-dev
lrwxrwxrwx 1 root root 83 Sep 16 09:20 docker-extension -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-extension
lrwxrwxrwx 1 root root 82 Sep 16 09:20 docker-feedback -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-feedback
lrwxrwxrwx 1 root root 78 Sep 16 09:20 docker-init -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-init
lrwxrwxrwx 1 root root 78 Sep 16 09:20 docker-sbom -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-sbom
lrwxrwxrwx 1 root root 79 Sep 16 09:20 docker-scout -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-scout
I’ve got docker installed with the docker repo:
$ apt list --installed | grep docker
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
docker-buildx-plugin/bookworm,now 0.17.1-1~debian.12~bookworm amd64 [installed]
docker-ce-cli/bookworm,now 5:27.3.1-1~debian.12~bookworm amd64 [installed]
docker-ce-rootless-extras/bookworm,now 5:27.3.1-1~debian.12~bookworm amd64 [installed,automatic]
docker-ce/bookworm,now 5:27.3.1-1~debian.12~bookworm amd64 [installed]
docker-compose-plugin/bookworm,now 2.29.7-1~debian.12~bookworm amd64 [installed]
The weird thing is that docker compose
works just fine, even though its in that list of plugins pointing to nowhere? so there’s probably a little more going on that I don’t understand. I don’t really want to blow away my distro and start from scratch although that is always an option. Can I just remove all those symlinks in the plugins dir and then reinstall with apt somehow? Any ideas are welcome and thanks in advance!