Giter Club home page Giter Club logo

docker-nfs-server's Introduction

docker-nfs-server's People

Contributors

3onyc avatar arfordweb avatar cpuguy83 avatar rafaelweingartner avatar wallnerryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-nfs-server's Issues

Link in readme

In redme there is a link http://www.tech-d.net/2014/03/29/docker-quicktip-4-remote-volumes/, which leads to non related webpage.

documentation and running with -d

noticed in the readme you were running without --privileged, dont we still need to?

Also, I am trying to run this and connect this via different networking options, in order to do so i'd really like to able to run and NFS server in the container without using -d.

I am experimenting other ways to explore what I am doing, but is there a way to run the nfs-kernel-server while keeping the tty/stdin/out open in with a bash shell?

Run on Rancher, fails with cannot create directory '/etc/services': File exists

Hi, I'm trying to run this on Rancher with this docker-compose.yml-file:

version: '2'
services:
  docker-nfs:
    privileged: true
    image: cpuguy83/nfs-server
    volumes:
    - /mnt/volume-fra1-01:/exports
    pid: host
    ports:
    - 2049:2049/tcp
    - 111:111/udp
    command:
    - /exports
    - /etc/services:/etc/services:ro

But it fails with this error:

7/14/2017 11:50:18 PMmkdir: cannot create directory '/etc/services': File exists

Hope it's okay that I open an issue here, I don't know how to fix this!

how do i mount the volume from a remote client?

I would like to mount the volume from a remote client. how can i do that?

e.g. i've already set up the nfs server docker container but i'm not sure how this container's nfs directory can be accessed from the remote client.

i've went inside the nfs server container but i cant seem to do "service nfs start". is this normal?

NFS Swarm Service?

I'm at a loss for how to run this as a Swarm service, since there is no service equivalent for --privileged as far as I can tell. Is this possible?

Not starting NFS kernel

When I run the docker I keep getting * Not starting NFS kernel daemon: no support in current kernel.
Setting up watches.
Watches established. in the log file.

Cannot get this to work on docker for mac

I've been playing with this docker image, and i can't get it work. This #10 (comment) suggests that it has something to do with docker for mac?

Docker for Mac: version: 17.05.0-ce-rc1-mac8 (73d01bb48)
macOS: version 10.12.4 (build: 16E195)
logs: /tmp/EC7E2B46-C25B-449F-9F56-141F10C7E01C/20170526-103657.tar.gz
[OK]     db.git
[OK]     vmnetd
[OK]     dns
[OK]     driver.amd64-linux
[OK]     virtualization VT-X
[OK]     app
[OK]     moby
[OK]     system
[OK]     moby-syslog
[OK]     db
[OK]     env
[OK]     virtualization kern.hv_support
[OK]     slirp
[OK]     osxfs
[OK]     moby-console
[OK]     logs
[OK]     docker-cli
[OK]     menubar
[OK]     disk

NFS Client only works on same host as NFS server

I have been playing around with your awesome work on NFS for docker but am currently having a problem was hoping you could help me with:

First I made sure the kernel had the appropriate mods:

sudo modprobe nfs
sudo modprobe nfsd

Scenario 1 (Client on same VM)

docker run -d -p 2049:2049 --name nfs-server --privileged cpuguy83/docker-nfs-server /home
docker run -d --name nfs-client --link nfs-server:nfs --privileged -v /mnt cpuguy83/docker-nfs-client /home:/mnt

Since the nfs-client is on the same server I can use --link and everything works great without issue

Scenario 2 (Client on different VM)

docker run -d -p 2049:2049 --name nfs-server --privileged cpuguy83/docker-nfs-server /home
docker run -d --name nfs-client -e NFS_PORT_2049_TCP_ADDR=ip_address --privileged -v /mnt cpuguy83/docker-nfs-client /home:/mnt

This scenario fails for me no matter what IP address I try. I have tried both COREOS_PUBLIC_IP and COREOS_PRIVATE_IP and they don't work. Is there anything special I need to do as can no longer use internal ip's from docker since the client is on a separate host and an IP of 10.0.0.1 won't be anything in this context.

Appreciate any guidance!

Error starting NFS Kernel

When trying to run the docker image I get the following error:

 * Exporting directories for NFS kernel daemon...
   ...done.
 * Starting NFS kernel daemon
rpc.nfsd: unable to resolve ANYADDR:nfs to inet address: Servname not supported for ai_socktype
rpc.nfsd: unable to resolve ANYADDR:nfs to inet6 address: Servname not supported for ai_socktype
rpc.nfsd: unable to set any sockets for nfsd
   ...fail!
Setting up watches.
Watches established.

I ran it with:

docker run -d --name nfs -v /data:/data -p 2049:2049/tcp --privileged cpuguy83/nfs-server /data

This was working prior to the latest version on docker hub.

Testing locally I was able to get it working by creating /etc/services with:

 nfs     2049/tcp    # Network File System
 nfs     2049/udp    # Network File System

Or alternatively by changing to dockerfile to also install the netbase package.

NFS container that was causing high CPU

I run this command:

docker run -d --name nfs --privileged cpuguy83/nfs-server /tmp /home

and getty process hang 100% cpu on host. What I doing wrong?

If I try run without privileged I get this:

fgetty: could not chown/chmod tty device
mount: block device nfsd is write-protected, mounting read-only
mount: cannot mount block device nfsd read-only
 * Exporting directories for NFS kernel daemon...
exportfs: No options for /tmp /home: suggest /home(sync) to avoid warning
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "/home:/tmp".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: Invalid IP address /home
exportfs: Invalid IP address /home
exportfs: could not open /proc/fs/nfs/exports for locking: errno 13 (Permission denied)
   ...done.
 * Starting NFS kernel daemon
rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
   ...fail!
Setting up watches.
Watches established.
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device
fgetty: could not chown/chmod tty device

mkdir: cannot create directory '/etc/services': File exists

Using this docker-compose.yml:

docker-nfs:
 image: cpuguy83/nfs-server
 privileged: true
 volumes:
 - /exports
 command:
 - /exports
 - /etc/services:/etc/services

Then running docker-compose up

Produce:

Creating nfsserver_docker-nfs_1 ...
Creating nfsserver_docker-nfs_1 ... done
Attaching to nfsserver_docker-nfs_1
docker-nfs_1  | mkdir: cannot create directory '/etc/services': File exists
nfsserver_docker-nfs_1 exited with code 1

Same results on MacOSX (docker Server Version: 17.06.0-ce)
and linux (docker Server Version: 17.05.0-ce)

Please advice :)

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.