Hi, after upgrading to F41 I tried to build a docker image with the same command I always use and got a weird error.
$ docker build -t localhost/test-base:latest -f Dockerfile.baseimage .
unknown shorthand flag: 't' in -t
I thought, F41 might have come with a new docker CLI and the option changed. So I checked man docker-build
but the -t
option was still there.
Next I tried to run the build without arguments and I found the culprit:
$ docker build
docker: 'buildx' is not a docker command.
See 'docker --help'
Do I have the buildx plugin?
$ rpm -qa | grep docker
docker-cli-27.3.1-2.fc41.x86_64
docker-buildx-0.18.0-1.fc41.x86_64
Yes. So where is the plugin installed then?
$ rpm -ql docker-buildx | grep docker-buildx$
/usr/libexec/docker/cli-plugins/docker-buildx
/usr/share/doc/docker-buildx
/usr/share/licenses/docker-buildx
Quickly checking the docs at Install the Compose plugin | Docker Docs and Docker Plugin API | Docker Docs they reference the following plugin directories:
~/.docker/cli-plugins
/usr/local/lib/docker/cli-plugins
/usr/lib/docker/cli-plugins
/etc/docker/cli-plugins
But there is no /usr/libexec/docker/cli-plugins
mentioned anywhere.
So I tried the following:
$ mkdir -p ~/.docker/cli-plugins
$ cd ~/.docker/cli-plugins
$ ln -s /usr/libexec/docker/cli-plugins/docker-buildx .
Then tried the build command again:
$ docker build
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.
Usage: docker buildx build [OPTIONS] PATH | URL | -
Start a build
It worked! And now also my original build works with as before.
Is this a change in the plugin path accidental or did I miss to make some configuration change between F40 and F41?
I’ve also noticed that docker plugin
commands don’t work, but I don’t know if it was working before on F40, never used that before.
$ docker plugin ls
Error response from daemon: Path /v1.41/plugins is not supported