Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ucphhpc/docker-volume-sshfs
sshfs docker volume plugin
https://github.com/ucphhpc/docker-volume-sshfs
Last synced: 10 days ago
JSON representation
sshfs docker volume plugin
- Host: GitHub
- URL: https://github.com/ucphhpc/docker-volume-sshfs
- Owner: ucphhpc
- License: mit
- Fork: true (vieux/docker-volume-sshfs)
- Created: 2017-12-19T21:21:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T14:33:21.000Z (5 months ago)
- Last Synced: 2024-08-01T12:18:10.493Z (3 months ago)
- Language: Go
- Size: 5.8 MB
- Stars: 28
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker volume plugin for sshFS
See vieux/sshfs for original documentation
This plugin allows you to mount remote folder using sshfs in your container easily.
## Usage
### Using a password
1 - Install the plugin
```
$ docker plugin install ucphhpc/sshfs# or to enable debug
docker plugin install ucphhpc/sshfs DEBUG=1# or to change where plugin state is stored
docker plugin install ucphhpc/sshfs state.source=
```2 - Create a volume
> Make sure the ***source path on the ssh server was exists***.
>
> Or you'll be failed while use/mount the volume.```
$ docker volume create -d ucphhpc/sshfs -o sshcmd= -o password= [-o port=] [-o ] sshvolume
sshvolume
$ docker volume ls
DRIVER VOLUME NAME
local 2d75de358a70ba469ac968ee852efd4234b9118b7722ee26a1c5a90dcaea6751
local 842a765a9bb11e234642c933b3dfc702dee32b73e0cf7305239436a145b89017
local 9d72c664cbd20512d4e3d5bb9b39ed11e4a632c386447461d48ed84731e44034
local be9632386a2d396d438c9707e261f86fd9f5e72a7319417901d84041c8f14a4d
local e1496dfe4fa27b39121e4383d1b16a0a7510f0de89f05b336aab3c0deb4dda0e
ucphhpc/sshfs sshvolume
```3 - Use the volume
```
$ docker run -it -v sshvolume: busybox ls
```### Using an ssh key
1 - Install the plugin
```
$ docker plugin install ucphhpc/sshfs sshkey.source=/home//.ssh/# or to enable debug
docker plugin install ucphhpc/sshfs DEBUG=1 sshkey.source=/home//.ssh/# or to change where plugin state is stored
docker plugin install ucphhpc/sshfs state.source= sshkey.source=/home//.ssh/
```2 - Create a volume
> Make sure the ***source path on the ssh server exists***.
>
> Or you will fail when you use/mount the volume.```
$ docker volume create -d ucphhpc/sshfs -o sshcmd= [-o IdentityFile=/root/.ssh/] [-o port=] [-o ] sshvolume
sshvolume
$ docker volume ls
DRIVER VOLUME NAME
local 2d75de358a70ba469ac968ee852efd4234b9118b7722ee26a1c5a90dcaea6751
local 842a765a9bb11e234642c933b3dfc702dee32b73e0cf7305239436a145b89017
local 9d72c664cbd20512d4e3d5bb9b39ed11e4a632c386447461d48ed84731e44034
local be9632386a2d396d438c9707e261f86fd9f5e72a7319417901d84041c8f14a4d
local e1496dfe4fa27b39121e4383d1b16a0a7510f0de89f05b336aab3c0deb4dda0e
ucphhpc/sshfs sshvolume
```3 - Use the volume
```
$ docker run -it -v sshvolume: busybox ls
```## LICENSE
MIT