我正在尝试在Docker容器中运行riofs,但是当我尝试运行riofs时,出现以下错误:

fuse: device not found, try 'modprobe fuse' first
ERROR! Failed to mount FUSE partition !
ERROR! Failed to create FUSE fs ! Mount point: /path/to/dir

这是我的DockerFile的样子:
FROM ubuntu:16.04

RUN apt-get update -qq
RUN apt-get install -y \
            build-essential \
            gcc \
            make \
            automake \
            autoconf \
            libtool \
            pkg-config \
            intltool \
            libglib2.0-dev \
            libfuse-dev \
            libxml2-dev \
            libevent-dev \
            libssl-dev \
            && rm -rf /var/lib/apt/lists/*

    RUN curl -L https://github.com/skoobe/riofs/archive/v${VERSION}.tar.gz | tar zxv -C /usr/src
    RUN cd /usr/src/riofs-${VERSION} && ./autogen.sh && ./configure --prefix=/usr && make && make install

    WORKDIR /opt/riofs/bin

    CMD ["bash"]

最佳答案

我需要添加运行时特权SYS_ADMIN,因为 fuse 需要安装/卸载的权限。

docker run -it --cap-add SYS_ADMIN --device /dev/fuse [IMAGE] bash

关于docker - Riofs-找不到 fuse 装置,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51263555/

10-14 00:26