我正在docker容器中安装一个docker卷。
许多文档建议使用privileged run命令..。但是我正在尝试用它来构建docker图像。
我正在犯错误:
没有免费的尾波设备可用。
你知道我做错了什么吗?我使用AWS EKS来部署这个映像。如果有一个选项可以用EKS实现,那么这个答案也是可以接受的。
DockerFile:
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注意:我需要一些东西来建造码头,而不是码头.由于我使用的是EKS,码头运行不适用.-)可以通过Docker添加CAP_ADD来实现这一点。
发布于 2020-04-20 06:28:02
您可以在启动时在吊舱中使用PersistentVolume。您需要检查支持DAVFS的卷插件。要向吊舱添加功能,可以在吊舱中使用securityContext模块。请参阅以下链接:
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
https://stackoverflow.com/questions/60897930
复制相似问题