From bdb233f02ad81ebee50c6ed7def808fbc72f0b7d Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Tue, 8 Apr 2025 12:48:42 +0100 Subject: [PATCH 1/6] replace sshfs with rclone --- content/manuals/engine/storage/volumes.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/manuals/engine/storage/volumes.md b/content/manuals/engine/storage/volumes.md index 5fbe2748f0ef..87b8ccdb459a 100644 --- a/content/manuals/engine/storage/volumes.md +++ b/content/manuals/engine/storage/volumes.md @@ -555,20 +555,20 @@ host and can connect to the second node using SSH. On the Docker host, install the `vieux/sshfs` plugin: ```console -$ docker plugin install --grant-all-permissions vieux/sshfs +$ docker plugin install --grant-all-permissions rclone/docker-volume-rclone --aliases rclone ``` ### Create a volume using a volume driver -This example specifies an SSH password, but if the two hosts have shared keys +This example specifies an SSH password using a custom `rclone.conf` file, but if the two hosts have shared keys configured, you can exclude the password. Each volume driver may have zero or more configurable options, you specify each of them using an `-o` flag. ```console -$ docker volume create --driver vieux/sshfs \ - -o sshcmd=test@node2:/home/test \ - -o password=testpassword \ - sshvolume +$ docker volume create --driver rclone \ + -o remote=remotehost:home/test \ + -o prclone_config="$(cat /path/to/rclone.conf)" \ + rclonevolume ``` ### Start a container which creates a volume using a volume driver @@ -584,8 +584,8 @@ Each volume driver may have zero or more configurable options. ```console $ docker run -d \ - --name sshfs-container \ - --mount type=volume,volume-driver=vieux/sshfs,src=sshvolume,target=/app,volume-opt=sshcmd=test@node2:/home/test,volume-opt=password=testpassword \ + --name rclone-container \ + --mount type=volume,volume-driver=rclone,src=rclonevolume,target=/app,volume-opt=remote=remotehost:home/test,volume-opt=rclone_config=$(cat /path/to/rclone.conf) \ nginx:latest ``` From 595af5e791c0ecdf6ffdb5f0469e087cff1badc0 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Tue, 8 Apr 2025 12:49:14 +0100 Subject: [PATCH 2/6] replace sshfs with rclone --- content/manuals/engine/storage/volumes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/manuals/engine/storage/volumes.md b/content/manuals/engine/storage/volumes.md index 87b8ccdb459a..010710fec26f 100644 --- a/content/manuals/engine/storage/volumes.md +++ b/content/manuals/engine/storage/volumes.md @@ -526,7 +526,7 @@ store data in the cloud, without changing the application logic. When you create a volume using `docker volume create`, or when you start a container which uses a not-yet-created volume, you can specify a volume driver. -The following examples use the `vieux/sshfs` volume driver, first when creating +The following examples use the `rclone` volume driver, first when creating a standalone volume, and then when starting a container which creates a new volume. From cb42da3e25356a12cf1db5760b8da3da1980cc7d Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 9 Apr 2025 13:30:53 +0100 Subject: [PATCH 3/6] review edits --- content/manuals/engine/storage/volumes.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/content/manuals/engine/storage/volumes.md b/content/manuals/engine/storage/volumes.md index 010710fec26f..990f48234550 100644 --- a/content/manuals/engine/storage/volumes.md +++ b/content/manuals/engine/storage/volumes.md @@ -526,7 +526,7 @@ store data in the cloud, without changing the application logic. When you create a volume using `docker volume create`, or when you start a container which uses a not-yet-created volume, you can specify a volume driver. -The following examples use the `rclone` volume driver, first when creating +The following examples use the `rclone/docker-volume-rclone` volume driver, first when creating a standalone volume, and then when starting a container which creates a new volume. @@ -561,16 +561,21 @@ $ docker plugin install --grant-all-permissions rclone/docker-volume-rclone --al ### Create a volume using a volume driver This example specifies an SSH password using a custom `rclone.conf` file, but if the two hosts have shared keys -configured, you can exclude the password. Each volume driver may have zero or more +configured, you can exclude the password. + +This example mounts the `/remote` directory on host `1.2.3.4` into a +volume named `rclonevolume`. Each volume driver may have zero or more configurable options, you specify each of them using an `-o` flag. ```console -$ docker volume create --driver rclone \ - -o remote=remotehost:home/test \ - -o prclone_config="$(cat /path/to/rclone.conf)" \ - rclonevolume +$ docker volume create \ + -d rclone \ + --name rclonevolume \ + -o type=sftp -o path=remote -o sftp-host=1.2.3.4 -o sftp-user=user ``` +This volume can now be mounted into containers. + ### Start a container which creates a volume using a volume driver The following example specifies an SSH password. However, if the two hosts have From 8f3d0854e06f7b2eb576521555b93dd70538aaf7 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 9 Apr 2025 13:33:49 +0100 Subject: [PATCH 4/6] review edits --- content/manuals/engine/storage/volumes.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/content/manuals/engine/storage/volumes.md b/content/manuals/engine/storage/volumes.md index 990f48234550..15a3e23a3910 100644 --- a/content/manuals/engine/storage/volumes.md +++ b/content/manuals/engine/storage/volumes.md @@ -560,9 +560,6 @@ $ docker plugin install --grant-all-permissions rclone/docker-volume-rclone --al ### Create a volume using a volume driver -This example specifies an SSH password using a custom `rclone.conf` file, but if the two hosts have shared keys -configured, you can exclude the password. - This example mounts the `/remote` directory on host `1.2.3.4` into a volume named `rclonevolume`. Each volume driver may have zero or more configurable options, you specify each of them using an `-o` flag. @@ -571,17 +568,16 @@ configurable options, you specify each of them using an `-o` flag. $ docker volume create \ -d rclone \ --name rclonevolume \ - -o type=sftp -o path=remote -o sftp-host=1.2.3.4 -o sftp-user=user + -o type=sftp + -o path=remote + -o sftp-host=1.2.3.4 + -o sftp-user=user ``` This volume can now be mounted into containers. ### Start a container which creates a volume using a volume driver -The following example specifies an SSH password. However, if the two hosts have -shared keys configured, you can exclude the password. -Each volume driver may have zero or more configurable options. - > [!NOTE] > > If the volume driver requires you to pass any options, @@ -590,7 +586,7 @@ Each volume driver may have zero or more configurable options. ```console $ docker run -d \ --name rclone-container \ - --mount type=volume,volume-driver=rclone,src=rclonevolume,target=/app,volume-opt=remote=remotehost:home/test,volume-opt=rclone_config=$(cat /path/to/rclone.conf) \ + --mount type=volume,volume-driver=rclone,src=rclonevolume,target=/app,volume-opt=type=sftp,volume-opt=path=remote, volume-opt=sftp-host=1.2.3.4,volume-opt=sftp-user=user \ nginx:latest ``` From 7e66bc90eb66f09d9d90db82d2b5eec30ccffbb5 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 9 Apr 2025 15:37:31 +0100 Subject: [PATCH 5/6] review edits --- content/manuals/engine/storage/volumes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/manuals/engine/storage/volumes.md b/content/manuals/engine/storage/volumes.md index 15a3e23a3910..205a2ff44127 100644 --- a/content/manuals/engine/storage/volumes.md +++ b/content/manuals/engine/storage/volumes.md @@ -572,6 +572,7 @@ $ docker volume create \ -o path=remote -o sftp-host=1.2.3.4 -o sftp-user=user + -o "sftp-password=$(cat file_containing_password_for_remote_host)" ``` This volume can now be mounted into containers. @@ -586,7 +587,7 @@ This volume can now be mounted into containers. ```console $ docker run -d \ --name rclone-container \ - --mount type=volume,volume-driver=rclone,src=rclonevolume,target=/app,volume-opt=type=sftp,volume-opt=path=remote, volume-opt=sftp-host=1.2.3.4,volume-opt=sftp-user=user \ + --mount type=volume,volume-driver=rclone,src=rclonevolume,target=/app,volume-opt=type=sftp,volume-opt=path=remote, volume-opt=sftp-host=1.2.3.4,volume-opt=sftp-user=user,volume-opt=-o "sftp-password=$(cat file_containing_password_for_remote_host)" \ nginx:latest ``` From aaaf67c7c044ca31b2531839fc0ad6189b347a82 Mon Sep 17 00:00:00 2001 From: aevesdocker Date: Wed, 9 Apr 2025 15:40:52 +0100 Subject: [PATCH 6/6] review edits --- content/manuals/engine/storage/volumes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/manuals/engine/storage/volumes.md b/content/manuals/engine/storage/volumes.md index 205a2ff44127..0aa9c3fe708f 100644 --- a/content/manuals/engine/storage/volumes.md +++ b/content/manuals/engine/storage/volumes.md @@ -568,10 +568,10 @@ configurable options, you specify each of them using an `-o` flag. $ docker volume create \ -d rclone \ --name rclonevolume \ - -o type=sftp - -o path=remote - -o sftp-host=1.2.3.4 - -o sftp-user=user + -o type=sftp \ + -o path=remote \ + -o sftp-host=1.2.3.4 \ + -o sftp-user=user \ -o "sftp-password=$(cat file_containing_password_for_remote_host)" ```