You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a directory /usr/libexec/docker/cli-plugins with correct permissions (root:root 755) and a plugin /usr/libexec/docker/cli-plugins/docker-buildx, if we create a directory /usr/local/libexec with permissions (root:root 750), running docker build fails as it won't find buildx.
I suspect that as docker-cli checks for plugins in the directories in the precedence order, if any of the directories is not accessible, the plugin search fails and directories specified later in the precedence order will not be checked and thus plugins in other folder won't be found.
The workaround is easy to just fix the permissions, so not a big problem. But I would expect docker-cli to skip such directory as it does with non-existent directories.
Reproduce
Given docker plugin /usr/libexec/docker/cli-plugins/docker-buildx
Remove non-root access from a higher precedence plugin folder chmod 750 /usr/local/libexec
Try to run the plugin via docker-cli docker buildx
It fails with docker: 'buildx' is not a docker command.
Expected behavior
docker buildx works, because the plugin under /usr/libexec/docker/cli-plugins is still accessible.
Description
I think there is a bug in how docker cli resolves the plugin paths. Described also in https://discussion.fedoraproject.org/t/docker-plugins-on-f41-not-working/138199/9
Given a directory
/usr/libexec/docker/cli-plugins
with correct permissions (root:root 755) and a plugin/usr/libexec/docker/cli-plugins/docker-buildx
, if we create a directory/usr/local/libexec
with permissions (root:root 750), runningdocker build
fails as it won't findbuildx
.I suspect that as docker-cli checks for plugins in the directories in the precedence order, if any of the directories is not accessible, the plugin search fails and directories specified later in the precedence order will not be checked and thus plugins in other folder won't be found.
The workaround is easy to just fix the permissions, so not a big problem. But I would expect docker-cli to skip such directory as it does with non-existent directories.
Reproduce
/usr/libexec/docker/cli-plugins/docker-buildx
chmod 750 /usr/local/libexec
docker buildx
docker: 'buildx' is not a docker command.
Expected behavior
docker buildx
works, because the plugin under/usr/libexec/docker/cli-plugins
is still accessible.docker version
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: