ehough / docker-nfs-server

A lightweight, robust, flexible, and containerized NFS server.
https://hub.docker.com/r/erichough/nfs-server/
GNU General Public License v3.0
669 stars 221 forks source link

kernel module nfs is missing #82

Open alen-linux opened 6 months ago

alen-linux commented 6 months ago
haiyue@Qinghui:~/win10/docker-data/nfs$ uname -a
Linux Qinghui 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

haiyue@Qinghui:~/win10/docker-data/nfs$ cat /etc/modules-load.d/modules.conf 
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

modprobe nfs
modprobe nfsd

haiyue@Qinghui:~/win10/docker-data/nfs$ docker run \
-v /home/haiyue/win10/docker-data/nfs:/nfsshare:rw \
-e "NFS_EXPORT_0"="/nfsshare  *(rw,sync,no_root_squash,no_all_squash,no_subtree_check,nohide,crossmnt)"  \
--privileged \
-p 2049:2049 \
erichough/nfs-server

==================================================================
      SETTING UP ...
==================================================================
----> building /etc/exports from environment variables
----> collected 1 valid export(s) from NFS_EXPORT_* environment variables
----> kernel module nfs is missing
----> 
----> ERROR: nfs module is not loaded in the Docker host's kernel (try: modprobe nfs)
----> 

why?

alen-linux commented 6 months ago
haiyue@Qinghui:~/win10/docker-data/nfs$ docker info
Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose