CloudDrive以及无法正常使用,请使用CloudDrive2
Linux版安装方法:
运行前请先确保系统已安装fuse3,确定fusermount3命令可以正常运行:
yum install fuse3
mkdir -p /etc/systemd/system/docker.service.d/
cat <<EOF > /etc/systemd/system/docker.service.d/clear_mount_propagation_flags.conf [Service]
MountFlags=shared EOF
df -h ##检查挂载点目录
mount --make-shared /home ##选择一个目录挂载
方法 1
创建docker-compose.yml 并编辑它
touch docker-compose.yml
version: "2.1"
services:
cloudnas:
image: cloudnas/clouddrive2-unstable
container_name: clouddrive2
ports:
- "19798:19798"
environment:
- TZ=Asia/Shanghai
- CLOUDDRIVE_HOME=/Config
volumes:
- /home/clouddrive/shared:/CloudNAS:shared
- /home/clouddrive/Config:/Config
- /home/clouddrive/media/shared:/media:shared #optional media path of host
devices:
- /dev/fuse:/dev/fuse
restart: unless-stopped
pid: "host"
privileged: true #or you can try capp_add -SYS_ADMIN
#cap_add: #SYS_ADMIN cap may fail on some OSes, use privileged: true instead
# - SYS_ADMIN
network_mode: "host" #if network_mode doesn't work, use port mapping
启动clouddrive2
docker-compose pull
docker-compose up -d
方法 2
如果不用docker-compose可以直接执行下面命令拉取镜像
docker pull cloudnas/clouddrive2-unstable
docker run -d \
--name clouddrive2 \
--restart unless-stopped \
--env CLOUDDRIVE_HOME=/Config \
-v /home/clouddrive/shared:/CloudNAS:shared \
-v /home/clouddrive/Config:/Config \
-v /home/clouddrive/media/shared:/media:shared \
-p:19798:19798 \
--privileged \
--device /dev/fuse:/dev/fuse \
cloudnas/clouddrive2-unstable
本文章由 brokenway 发布在 个人知识库 ,文章所述不代表本站观点,法律风险由发布者自行承担,转载请注明出处!