5

When I try to do a Docker Build using Docker as usual, I get the error message in the image and cannot Build. What should I do in this case? By the way, Docker's version is 23.0.1. (https://i.stack.imgur.com/AzgNi.png)(https://i.stack.imgur.com/PIryk.png) (https://i.stack.imgur.com/kMF5Y.png)

When I uninstall docker buildx and then Build, I get other warning errors and the Build itself works, but parallel processing cannot be performed. My ideal would be to use Buildx to do a parallel Build.

michi
  • 63
  • 1
  • 4

3 Answers3

8

I also had a similar issue with version 23.0.2. For me it was missing buildx package. Following command solved the issue.

apt-get install docker-buildx-plugin

Message and docs of docker on linux are a bit vague unfortunately. I found out the missing package while I was planning to install docker from scratch.

hfurkanvural
  • 420
  • 2
  • 16
3

Did you maybe use Docker Desktop on Windows, uninstall it, and then tried to install Docker directly on WSL?

In that case you may have an issue that in /usr/local/lib/docker/cli-plugins/ you don't have actual files, but broken links to WSL installation. This happened to me.

To verify check output from: ls -la /usr/local/lib/docker/cli-plugins/

In my case, I rm these broken links, then rerun Docker installation on WSL and it solved the problem.

  • In my case it was sufficient to just remove these old/broken symlinks. I did not have to reinstall docker. I did run the command `sudo apt-get install --reinstall docker-buildx-plugin docker-compose-plugin docker-scan-plugin` though, but this command did not restore any symlinks/files in that directory. – robert Apr 08 '23 at 09:02
0

A more complete solution:

  1. Find the name of the missing system package using substring search with apt cache:
$ apt cache buildx
docker-buildx-plugin - Docker Buildx cli plugin.
  1. Update packages lists and install the required package (using apt - newer version of apt-get - and standard user with sudo, rather than root):
$ sudo apt update && sudo apt install -y docker-buildx-plugin
mirekphd
  • 4,799
  • 3
  • 38
  • 59