我正在尝试使用docker启动NFS服务器。我创建了Dockerfile:
FROM ubuntu:latest
ENV TERM linux
RUN apt-get update
RUN apt-get install --assume-yes \
software-properties-common wget
RUN apt-get install --assume-yes \
pkg-config \
curl jq vim \
nfs-kernel-server
RUN mkdir /var/nfs/general -p
RUN chown nobody:nogroup /var/nfs/general
然后我做了以下命令:
sudo docker build -t nfs-ubunta .
sudo docker run --privileged -it nfs-host-ubuntu:latest /bin/bash
我将此行添加到 etc / exports :
/var/nfs/general 172.17.0.3(rw,sync,no_subtree_check)
systemctl restart nfs-kernel-server
我得到了这个错误:
Not starting NFS kernel daemon: no support in current kernel.
输出lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial