Code Monkey home page Code Monkey logo

docker-volume-sshfs's Introduction

Docker volume plugin for sshFS

This plugin allows you to mount remote folder using sshfs in your container easily.

TravisCI Go Report Card

Usage

Using a password

1 - Install the plugin

$ docker plugin install vieux/sshfs

# or to enable debug 
docker plugin install vieux/sshfs DEBUG=1

# or to change where plugin state is stored
docker plugin install vieux/sshfs state.source=<any_folder>

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 vieux/sshfs -o sshcmd=<user@host:path> -o password=<password> [-o port=<port>] [-o <any_sshfs_-o_option> ] sshvolume
sshvolume
$ docker volume ls
DRIVER              VOLUME NAME
local               2d75de358a70ba469ac968ee852efd4234b9118b7722ee26a1c5a90dcaea6751
local               842a765a9bb11e234642c933b3dfc702dee32b73e0cf7305239436a145b89017
local               9d72c664cbd20512d4e3d5bb9b39ed11e4a632c386447461d48ed84731e44034
local               be9632386a2d396d438c9707e261f86fd9f5e72a7319417901d84041c8f14a4d
local               e1496dfe4fa27b39121e4383d1b16a0a7510f0de89f05b336aab3c0deb4dda0e
vieux/sshfs         sshvolume

3 - Use the volume

$ docker run -it -v sshvolume:<path> busybox ls <path>

Using an ssh key

1 - Install the plugin

$ docker plugin install vieux/sshfs sshkey.source=/home/<user>/.ssh/

# or to enable debug 
docker plugin install vieux/sshfs DEBUG=1 sshkey.source=/home/<user>/.ssh/

# or to change where plugin state is stored
docker plugin install vieux/sshfs state.source=<any_folder> sshkey.source=/home/<user>/.ssh/

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 vieux/sshfs -o sshcmd=<user@host:path> [-o IdentityFile=/root/.ssh/<key>] [-o port=<port>] [-o <any_sshfs_-o_option> ] sshvolume
sshvolume
$ docker volume ls
DRIVER              VOLUME NAME
local               2d75de358a70ba469ac968ee852efd4234b9118b7722ee26a1c5a90dcaea6751
local               842a765a9bb11e234642c933b3dfc702dee32b73e0cf7305239436a145b89017
local               9d72c664cbd20512d4e3d5bb9b39ed11e4a632c386447461d48ed84731e44034
local               be9632386a2d396d438c9707e261f86fd9f5e72a7319417901d84041c8f14a4d
local               e1496dfe4fa27b39121e4383d1b16a0a7510f0de89f05b336aab3c0deb4dda0e
vieux/sshfs         sshvolume

3 - Use the volume

$ docker run -it -v sshvolume:<path> busybox ls <path>

LICENSE

MIT

docker-volume-sshfs's People

Contributors

vieux avatar athurg avatar tiborvass avatar anthonydahanne avatar reederc42 avatar iiieii avatar ebuildy avatar yujunz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.