Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katsew/docker-nfs
https://github.com/katsew/docker-nfs
cli docker golang nfs
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/katsew/docker-nfs
- Owner: katsew
- License: mit
- Created: 2018-06-16T05:56:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-25T08:09:04.000Z (about 6 years ago)
- Last Synced: 2024-06-20T02:32:06.222Z (8 months ago)
- Topics: cli, docker, golang, nfs
- Language: Go
- Size: 29.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-nfs
[![CircleCI](https://circleci.com/gh/katsew/docker-nfs/tree/master.svg?style=svg)](https://circleci.com/gh/katsew/docker-nfs/tree/master)
configuration automation tools for docker nfs.
## Installation
```bash
$ go get github.com/katsew/docker-nfs
```## Usage
### exports
```bash
$ sudo docker-nfs exports --addr 192.168.33.10
```Auto configuration cli for native nfs configuration.
Command will do the following actions:1. Insert config (or create new) `/etc/exports`
2. Insert config (or create new) `/etc/nfs.conf`
3. Restart `nfsd` if at least one of the file appears above updates:zap: Use this command with `sudo` or your config file will accidentally update!
e.g.
```
$ cd /path/to/your/docker/project
$ sudo docker-nfs exports --addr 192.168.33.10
$ cat /etc/exports# BEGIN - docker-nfs [uid]:[gid]
"/path/to/your/docker/project" 192.168.33.10 -rw -alldirs -mapall=[uid]:[gid]
# END - docker-nfs [uid]:[gid]$ cat /etc/nfs.conf
## BEGIN - docker-nfs
nfs.server.mount.require_resv_port = 0
## END - docker-nfsnfsd will be restarted
```
### create-volume
```bash
$ docker-nfs create-volume --name project_local
```Create docker volume with type nfs for current directory
e.g.
```
$ cd /path/to/your/docker/volume/mountpoint
$ docker-nfs create-volume --name project_local
$ docker volume inspect project_local[
{
"CreatedAt": "",
"Driver": "local",
"Labels": {},
"Mountpoint": "/var/lib/docker/volumes/project_local/_data",
"Name": "project_local",
"Options": {
"device": ":/path/to/your/docker/volume/mountpoint",
"o": "addr=host.docker.internal,rw",
"type": "nfs"
},
"Scope": "local"
}
]
```# License
MIT