Coder Social home page Coder Social logo

Comments (4)

ehough avatar ehough commented on May 27, 2024

someone told me "nfs-kernel-server" was a kernel module, so nfs server cannot work in container.

This person is not correct :)

is it possible your solution works on ubuntu conatainer?

If you have an Ubuntu machine (or any Linux system) with Docker installed, you should be able to run this image and start and NFS server without any trouble. The image itself is based on Alpine Linux, but that's just an implementation detail.

Does that answer your question? Closing the issue but please feel free to continue the discussion and ask more questions!

from docker-nfs-server.

atline avatar atline commented on May 27, 2024

@ehough Appreciate for you response.

When I mean ubuntu, I just mean the container was based on ubuntu:

FROM ubuntu

Your solution is directly call with "readonly PATH_BIN_NFSD='/usr/sbin/rpc.nfsd'"

But in ubuntu or others, maybe service nfs-kernel-server start or with systemctl start.

I guess this will depend on some other service not sure, as you also did rpcbind, and also next:

rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults
nfsd /proc/fs/nfsd nfsd defaults

I'm not sure service nfs-kernel-server start do, anyway, I tried nearly all "ubuntu container solution" on dockerhub on my linux machine, none work, maybe all these solution is old... more than one year updated.

Anyway, I will continue to see the difference between your workable solution on alpine & other solution on ubuntu. But if you have any suggestion, I will also be appreciated, thanks.

from docker-nfs-server.

ehough avatar ehough commented on May 27, 2024

Previous versions of this image used Debian as its base. The last release to do so was tagged 1.2.0, and you can see the corresponding Dockerfile here.

If you really, really want to run an Ubuntu-based NFS server, you could build a custom version 1.2.0 like this:

$ git clone https://github.com/ehough/docker-nfs-server.git
$ cd docker-nfs-server
$ git checkout v1.2.0
$ docker build --build-arg BUILD_FROM=ubuntu .

You would then have a fully-functioning Ubuntu-based NFS server image. But I would not recommend this, as I can't think of any benefit over using the latest, Alpine-based version of this image.

Is there a particular reason that you prefer an Ubuntu image?

from docker-nfs-server.

atline avatar atline commented on May 27, 2024

Wow, that's useful, thanks!

The reason we have may violate the rule of docker for "one thing one container": just because there is opensource software we used, when it run it will start nfs-kernel-server to let its code to control a IOT device to download from this nfs. The software is based on debian/ubuntu, but its nfs-kernel-server cannot work in container, I just want to find workaround for this software to make it work for us in container.

Really thanks for your help!

from docker-nfs-server.

Related Issues (20)

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.