@@ -526,7 +526,7 @@ store data in the cloud, without changing the application logic.
526
526
527
527
When you create a volume using `docker volume create`, or when you start a
528
528
container which uses a not-yet-created volume, you can specify a volume driver.
529
- The following examples use the `vieux/sshfs ` volume driver, first when creating
529
+ The following examples use the `rclone/docker-volume-rclone ` volume driver, first when creating
530
530
a standalone volume, and then when starting a container which creates a new
531
531
volume.
532
532
@@ -555,27 +555,29 @@ host and can connect to the second node using SSH.
555
555
On the Docker host, install the `vieux/sshfs` plugin :
556
556
557
557
` ` ` console
558
- $ docker plugin install --grant-all-permissions vieux/sshfs
558
+ $ docker plugin install --grant-all-permissions rclone/docker-volume-rclone --aliases rclone
559
559
` ` `
560
560
561
561
# ## Create a volume using a volume driver
562
562
563
- This example specifies an SSH password, but if the two hosts have shared keys
564
- configured, you can exclude the password . Each volume driver may have zero or more
563
+ This example mounts the `/remote` directory on host `1.2.3.4` into a
564
+ volume named `rclonevolume` . Each volume driver may have zero or more
565
565
configurable options, you specify each of them using an `-o` flag.
566
566
567
567
` ` ` console
568
- $ docker volume create --driver vieux/sshfs \
569
- -o sshcmd=test@node2:/home/test \
570
- -o password=testpassword \
571
- sshvolume
568
+ $ docker volume create \
569
+ -d rclone \
570
+ --name rclonevolume \
571
+ -o type=sftp \
572
+ -o path=remote \
573
+ -o sftp-host=1.2.3.4 \
574
+ -o sftp-user=user \
575
+ -o "sftp-password=$(cat file_containing_password_for_remote_host)"
572
576
` ` `
573
577
574
- # ## Start a container which creates a volume using a volume driver
578
+ This volume can now be mounted into containers.
575
579
576
- The following example specifies an SSH password. However, if the two hosts have
577
- shared keys configured, you can exclude the password.
578
- Each volume driver may have zero or more configurable options.
580
+ # ## Start a container which creates a volume using a volume driver
579
581
580
582
> [!NOTE]
581
583
>
@@ -584,8 +586,8 @@ Each volume driver may have zero or more configurable options.
584
586
585
587
` ` ` console
586
588
$ docker run -d \
587
- --name sshfs -container \
588
- --mount type=volume,volume-driver=vieux/sshfs ,src=sshvolume ,target=/app,volume-opt=sshcmd=test@node2:/home/test ,volume-opt=password=testpassword \
589
+ --name rclone -container \
590
+ --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)" \
589
591
nginx:latest
590
592
` ` `
591
593
0 commit comments