linux - Docker,AWS-EKS : Docker-build command, Davfs 挂载不工作,没有免费的 coda 设备可以挂载

标签 linux amazon-web-services docker kubernetes amazon-eks

我正在安装 DAVFS内卷docker容器。

许多文档建议使用privileged run命令...但我正在尝试构建 docker图像与它。

我收到错误:

no free coda device available.



任何想法我做错了什么?我正在使用 AWS EKS部署此镜像。如果可以使用 EKS 执行此操作,这个答案也是可以接受的。

Docker 文件:
RUN apt-get update && apt-get install -y fuse davfs2 ca-certificates
RUN mkdir /mnt/ftp/
ARG WEB_DAV_URL=DAVFS_URL
RUN echo "DAVFS_URL DAVFS_USERNAME DAVFS_PASSWORD" >> /etc/davfs2/secrets
RUN mount.davfs $WEB_DAV_URL /mnt/

CMD service php7.2-fpm restart && cd /etc/apache2/ && apachectl -d /etc/apache2 -e info -DFOREGROUND

错误日志:
mount.davfs: loading kernel module fuse
mount.davfs: loading kernel module fuse failed
mount.davfs: waiting for /dev/fuse to be created
mount.davfs: can't open fuse device
mount.davfs: trying coda kernel file system
mount.davfs: no free coda device to mount

注意:我需要一些用于 docker build 的东西,而不是 docker run ......因为我使用的是 EKS,docker run 不适用...... :-) 有办法通过 Docker run 添加 CAP_ADD。

最佳答案

您可以在启动时在 pod 中使用 PersistentVolume。您需要检查支持 DAVFS 的音量插件。并将功能添加到您的 pod,您可以在您的 pod 中使用 securityContext 模块。请引用以下链接:

https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

关于linux - Docker,AWS-EKS : Docker-build command, Davfs 挂载不工作,没有免费的 coda 设备可以挂载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60897930/

相关文章:

python - 从 ubuntu 基础镜像和 python 基础镜像构建 docker 的区别?

nginx - docker-compose卷不包含来自镜像的最新静态代码

linux - 更改 NFS 共享的所有者

amazon-web-services - 如何从 VPN 访问 AWS ElastiCache (Redis)

postgresql - 在重新配置指向同一 Postgres RDS 实例后,在 AWS 中运行 SonarQube 5.3 时缺少规则

regex - 具有多个捕获组的 pcregrep

linux - 获取所有被 pkill 杀死的进程的 PID?

java - 在 Linux 上的 Spring Boot 中使用 JNA 加载 .so 文件时出现问题

linux - 初学者的 Bash 脚本 : "Unary Operator Expected" error && how to use grep to search for a variable from the output of a command?

amazon-web-services - AWS Glue 开发终端节点无法正常工作