Rootless docker uses wrong plugin sockets path #47752
Labels
area/plugins
area/rootless
Rootless mode
area/volumes
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
version/26.1
Description
I am currently trying to install rclone as a rootless docker volume plugin (adapting from the tutorial here), but when I try to create a volume using the rclone driver I always get the following:
I looked at the source code to find out why docker can't find the plugin, and it looks like docker has the plugin sockets path hard-coded to
/run/docker/plugins
, while I'm using/run/user/1000/docker/plugins
(or$XDG_RUNTIME_DIR/docker/plugins
) for the rclone volume plugin. I expected/run/user/1000/docker/plugins/rclone.sock
to be the path where I should put my plugin socket in rootless mode.The line where the path is hard-coded is here:
moby/pkg/plugins/discovery.go
Line 21 in faf84d7
But there's probably some other places too.
I think this issue is very similar to #43111 but has not been fixed yet. Also I'm pretty sure there was already a
plugins
folder in/run/user/1000/docker/
, which is why I assumed the socket had to be created there.Reproduce
rclone
(you might have to installfuse
too)~/.config/systemd/user/docker-volume-rclone.service
:~/.config/systemd/user/docker-volume-rclone.socket
:systemctl --user start docker-volume-rclone.socket && systemctl --user start docker-volume-rclone.service
docker volume create test -d rclone -o type=sftp -o sftp-host=_hostname_ -o sftp-user=_username_ -o sftp-pass=_password_ -o allow-other=true
Expected behavior
The volume with the
rclone
driver is created successfully.docker version
Client: Docker Engine - Community Version: 26.1.0 API version: 1.45 Go version: go1.21.9 Git commit: 9714adc Built: Mon Apr 22 17:06:56 2024 OS/Arch: linux/amd64 Context: rootless Server: Docker Engine - Community Engine: Version: 26.1.0 API version: 1.45 (minimum version 1.24) Go version: go1.21.9 Git commit: c8af8eb Built: Mon Apr 22 17:06:56 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.31 GitCommit: e377cd56a71523140ca6ae87e30244719194a521 runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0 rootlesskit: Version: 2.0.2 ApiVersion: 1.1.1 NetworkDriver: slirp4netns PortDriver: slirp4netns StateDir: /run/user/1000/dockerd-rootless slirp4netns: Version: 1.2.0 GitCommit: 656041d45cfca7a4176f6b7eed9e4fe6c11e8383
docker info
Additional Info
The temporary workaround I'm using is creating a file at
~/.local/lib/docker/plugins/rclone.spec
with the following content:This works fine for now. Although I'd like to note that I tried putting this file in
~/.config/docker/plugins
and that didn't work? Maybe another issue.The text was updated successfully, but these errors were encountered: