Does anyone know how to mount nfs share inside docker container with centos base image? I\'ve tried this command:
mount server:/dir /mount/point
I mount the nfs on docker container, thanks for @helmbert .
Run a docker container with the --privileged=true flag.
$ docker run -it --privileged=true centos:7 bash
[root@f7915ae635aa /]# yum install -y nfs-utils
Install the nfs tool package and mount nfs on CentOS.
[root@f7915ae635aa /]# yum install -y nfs-utils
[root@f7915ae635aa /]# mount -t nfs example.tw:/target/ /srv -o nolock
Show mount of the nfs server.
[root@f7915ae635aa /]# showmount example.tw
Hosts on example.tw:
10.10.10.1
10.10.10.2