github.com/divyam234/rclone@v1.64.1/cmd/serve/docker/help.go (about)

     1  package docker
     2  
     3  // Note: "|" will be replaced by backticks
     4  var longHelp = `
     5  This command implements the Docker volume plugin API allowing docker to use
     6  rclone as a data storage mechanism for various cloud providers.
     7  rclone provides [docker volume plugin](/docker) based on it.
     8  
     9  To create a docker plugin, one must create a Unix or TCP socket that Docker
    10  will look for when you use the plugin and then it listens for commands from
    11  docker daemon and runs the corresponding code when necessary.
    12  Docker plugins can run as a managed plugin under control of the docker daemon
    13  or as an independent native service. For testing, you can just run it directly
    14  from the command line, for example:
    15  |||
    16  sudo rclone serve docker --base-dir /tmp/rclone-volumes --socket-addr localhost:8787 -vv
    17  |||
    18  
    19  Running |rclone serve docker| will create the said socket, listening for
    20  commands from Docker to create the necessary Volumes. Normally you need not
    21  give the |--socket-addr| flag. The API will listen on the unix domain socket
    22  at |/run/docker/plugins/rclone.sock|. In the example above rclone will create
    23  a TCP socket and a small file |/etc/docker/plugins/rclone.spec| containing
    24  the socket address. We use |sudo| because both paths are writeable only by
    25  the root user.
    26  
    27  If you later decide to change listening socket, the docker daemon must be
    28  restarted to reconnect to |/run/docker/plugins/rclone.sock|
    29  or parse new |/etc/docker/plugins/rclone.spec|. Until you restart, any
    30  volume related docker commands will timeout trying to access the old socket.
    31  Running directly is supported on **Linux only**, not on Windows or MacOS.
    32  This is not a problem with managed plugin mode described in details
    33  in the [full documentation](https://rclone.org/docker).
    34  
    35  The command will create volume mounts under the path given by |--base-dir|
    36  (by default |/var/lib/docker-volumes/rclone| available only to root)
    37  and maintain the JSON formatted file |docker-plugin.state| in the rclone cache
    38  directory with book-keeping records of created and mounted volumes.
    39  
    40  All mount and VFS options are submitted by the docker daemon via API, but
    41  you can also provide defaults on the command line as well as set path to the
    42  config file and cache directory or adjust logging verbosity.
    43  `