Comments (4)
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.
@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.
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.
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)
- Client error 'mounting ... failed, reason given by server: No such file or directory' HOT 8
- mount.nfs: access denied by server while mounting 172.17.0.2:/mnt/nfstest/ HOT 1
- example of docker-compose.yml HOT 3
- directory does not support NFS HOT 5
- the showmount get stucked and outputs nothing
- Creating own Image from Dockerfile wont work HOT 3
- Error while mounting nfs in a pod
- Reduce RAM/Memory resources HOT 2
- No privs to container, how to mount before starting? HOT 3
- Vulnerabilities in Docker image erichough/nfs-server:2.2.1
- Kubernetes example? HOT 1
- rpcbind.target need to be disabled and stopped before start nfs-server container
- Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/exec: no such file or directory: unknown HOT 2
- Accessing the share from an external device
- 2: Unsupported version HOT 1
- aarch64 Support
- Is there anyway update /etc/exports outside without restart nfs container HOT 1
- ERROR: missing CAP_SYS_ADMIN via docker-compose HOT 7
- kernel module nfs is missing HOT 1
- Documentation update needed for describing binding export folders through environment variables
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nfs-server.