有谁知道如何使用 centos 基础映像在 docker 容器内挂载 nfs 共享?我试过这个命令:
mount server:/dir /mount/point
并得到下一个错误:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
当我尝试将它与 -o nolock 选项一起使用时,错误是:
mount.nfs: Operation not permitted
原文由 Anatoli 发布,翻译遵循 CC BY-SA 4.0 许可协议
从 docker 17.06 开始,您可以在运行时直接将 NFS 共享挂载到容器中,无需额外的能力
或者,您可以在容器之前创建卷: