1、安装docker
2、启用 MountFlags
2.1新建文件夹
sudo mkdir -p /etc/systemd/system/docker.service.d/
2.2给新建的文件夹写入内容
sudo cat <<EOF > /etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf
[Service]
MountFlags=shared
EOF
2.3重启
sudo systemctl restart docker.service
3、新建clouddrive2需要映射的文件夹
mkdir -p /home/docker/clouddrive/config /home/docker/clouddrive/cloudnas /home/docker/clouddrive/media
4、通过docker安装clouddrive2
docker run -d \
--name clouddrive \
--restart unless-stopped \
--env CLOUDDRIVE_HOME=/Config \
-v /home/docker/clouddrive/cloudnas:/CloudNAS:shared \
-v /home/docker/clouddrive/config:/Config \
-v /home/docker/clouddrive/media:/media:shared \
--network host \
--pid host \
--privileged \
--device /dev/fuse:/dev/fuse \
cloudnas/clouddrive2
5、访问cd2
浏览器输入ip+:19798即可访问