Populate stack-based volume remotely?

With API keys I can run rancher volume create blah from my local workstation and it will create a volume in my environment. How can I copy files into that volume from my local workstation? Right now the only thing I can see to do is to use scp or rsync to move them to my Rancher host, then docker run --rm -it -v $(pwd):/source -v stack-blah-8675309:/dest busybox cp -R /source /dest or the like. Is there a better way?

It’s a little circuitous but if you mount it into a container and know the host and container name/id you can do

rancher --host <host id> docker cp some/file <conatiner id>:/path/to/volume/

I got the host ID throughrancher hosts, I got the container ID through rancher ps -c, and I know the path to the volume because I have the docker-compose.yml file. So that’s actually all doable.

A rancher cp that used Rancher’s container names instead of Docker’s container IDs would be nice but probably not necessary. It’s a shame that Docker itself doesn’t really support remove volume access and we have to do it this way, but at least this works!