mount: /app/file: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.

在docker中使用mount命令挂载文件出现:mount: /app/file: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.

docker权限已经确定了没有问题,出现这个错误是因为没有安装cifs或nfs相关工具,可以直接在docker中执行以下命令安装(这种方式通常会因为网络或安全等各方面的限制,导致安装失败)

apt-get install -y cifs-utils

可以在dockerfile文件中添加以下命令安装,在生产镜像的时候就直接把工具包下载下来

RUN apt-get install -y cifs-utils

posted @ 2025-02-04 16:18  西红柿里没有番茄  阅读(236)  评论(0编辑  收藏  举报