Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gl-prototypes/cmd-localfs
Remotely sharing a local directory with a container over SSH
https://github.com/gl-prototypes/cmd-localfs
Last synced: 12 days ago
JSON representation
Remotely sharing a local directory with a container over SSH
- Host: GitHub
- URL: https://github.com/gl-prototypes/cmd-localfs
- Owner: gl-prototypes
- License: bsd-3-clause
- Created: 2018-01-11T22:15:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-13T13:32:28.000Z (over 6 years ago)
- Last Synced: 2024-08-02T02:15:05.192Z (3 months ago)
- Language: Go
- Size: 18.6 KB
- Stars: 28
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmd-localfs
Prototype of remote commands with access to local directory## Setting up
You need Docker.
## Build and run the server
The server daemon needs to run in Docker. You can build and run it with make:
```
$ make build run-server
```## Running the client
To quickly test, you can connect using `make client`. This is slightly boring since
you'll always be in this project directory. But it made a binary called `cmd-client`
that you can use from ANY directory.```
$ ./cmd-client localhost:2222
...
```Now try running the server on a remote machine and use the same client with it. It's currently
hardcoded to always use the `alpine` image as the command environment. This defeats the point
a little, but isn't the main point of *this* prototype.## Limitations
Not sure the best way to configure sshfs (you can see what I approximate as the right options
in the code) and I'm not sure how much of this problem is the SFTP server implementation BUT:Any files you create in the `/local` mount will be created but not written to and return an error.
For example, `touch` does make the file but returns an error that it couldn't. Using `mv` doesn't work.
You can, however, `touch` a file, ignore the error, then pipe data into the file with output
redirection for example.