Docker isn't recognizing plugins even though they're in the right PATH

I have a problem trying to find the plugins that I have in Docker.

I´ve done an OS with Buildroot where I selected the packages: containerd, daemon, docker-cli, docker-compose, docker-cli-buildx.

Docker-compose and docker-cli-buildx are the plugins I need to work with. The Buildroot compilation worked well, I flashed it into the sd card and started it all, but when I try to find my plugins with the command docker plugins ls, it’s blank.

Although when I run the commando docker info, I can see that in plugins it is recognizing just docker compose but no buildx. I also checked the path for both plugins and they are the same.

So, my question is, what can I do for Docker to recognize both plugins and start working with them. Because I can’t run containers if I don’t have the buildx plugin. Or is there another alternative?

Thanks in advance.

I guess you mean docker plugin ls. That is for the daemon plugins. Compose and buildx are client plugins.

Yes yes I tried docker plugin ls, and it is empty. Also when I look run the command docker info and look for the client plugins, compose is the only one that appears, no buildx.

I have no idea how Buildroot installs Docker. Here are the officially supported operating systems and the official installation guide

If you have problems with Docker installed by Buildroot, you can have better luck on a Buildroot support channel

https://buildroot.org/support.html

What I wrote about the docker plugin command is still true. So that at least works normally

Thank you so much for your help! I appreciate it:)

Sorry @norethvillalpando03, it looks like I was wrong and the plugins doesn’t have to be in the PATH. On Linux, I have docker compose at:

/usr/lib/docker/cll-plugins/docker-compose

It is not in my path, but Docker can find it. This is actually something I should have known when I wrote my previous answer, as docker --help shows the recognized plugins and it is not likely that Docker would list all the available commands in the PATH every time you run docker --help, but there are a couple of locations where these plugins can be. I tried to search for the documentation about the cli plugin system, but I found something totally different.

https://docs.docker.com/engine/reference/commandline/cli/#cli-plugin-options

Now I understand your confusion as that page indeed writes about the daemon plugins as cli plugins.

Later I found out, that the cli plugin system was deprecated:

https://docs.docker.com/engine/deprecated/#cli-plugins-support

Even though Compose still looks like a plugin and can be installed as docker-compose-plugin. The documentation of the original CLI plugins disappeared from everywhere, so I only found old instructions like this from a Docker Captain:

https://dille.name/slides/2019-11-13/020_advanced/080_docker_cli_plugins/slides.final/

Which does not answer your question, it just shows that your confusion is actually not surprising.

2 Likes

Hi I checked the info you gave to me, and thank you so much for taking your time to help me!! :slight_smile:

Just today I finally solved it. Even though it is in the correct path as the rest of the plugins, the command docker buildx doesn’t exist. In order to build with buildx I have to run the command: /usr/lib/docker/cli-plugins/buildx build.

Now I’m able to build images.

Thank you!! :slight_smile:

Hi! @norethvillalpando03

You have wrong path:
/usr/lib/docker/cli-plugins/buildx

It should be:
/usr/lib/docker/cli-plugins/docker-buildx

Have a nice day! :smiley: