当前位置: 首页 > news >正文

centos 用 docker 方式安装 dufs

首先安装 docker 环境

Alibaba Cloud Linux 3 安装 docker-CSDN博客

下载dufs镜像

docker pull sigoden/dufs

部署dufs应用

  • 创建部署目录
mkdir -p /app/dufs/data && cd /app/dufs/

  • 设置目录权限
chmod 777 -R /app/dufs/

配置参照

Dufs is a distinctive utility file server - https://github.com/sigoden/dufsUsage: dufs [OPTIONS] [serve-path]Arguments:[serve-path]  Specific path to serve [default: .]Options:-c, --config <file>        Specify configuration file-b, --bind <addrs>         Specify bind address or unix socket-p, --port <port>          Specify port to listen on [default: 5000]--path-prefix <path>   Specify a path prefix--hidden <value>       Hide paths from directory listings, e.g. tmp,*.log,*.lock-a, --auth <rules>         Add auth roles, e.g. user:pass@/dir1:rw,/dir2-A, --allow-all            Allow all operations--allow-upload         Allow upload files/folders--allow-delete         Allow delete files/folders--allow-search         Allow search files/folders--allow-symlink        Allow symlink to files/folders outside root directory--allow-archive        Allow download folders as archive file--enable-cors          Enable CORS, sets `Access-Control-Allow-Origin: *`--render-index         Serve index.html when requesting a directory, returns 404 if not found index.html--render-try-index     Serve index.html when requesting a directory, returns directory listing if not found index.html--render-spa           Serve SPA(Single Page Application)--assets <path>        Set the path to the assets directory for overriding the built-in assets--log-format <format>  Customize http log format--log-file <file>      Specify the file to save logs to, other than stdout/stderr--compress <level>     Set zip compress level [default: low] [possible values: none, low, medium, high]--completions <shell>  Print shell completion script for <shell> [possible values: bash, elvish, fish, powershell, zsh]--tls-cert <path>      Path to an SSL/TLS certificate to serve with HTTPS--tls-key <path>       Path to the SSL/TLS certificate's private key-h, --help                 Print help-V, --version              Print version

编辑部署文件

  • 可以直接使用docker-cli方式部署
docker run -v `pwd`:/data -p 5000:5000 --rm sigoden/dufs /data -A
  • 编辑docker-compose.yaml部署文件
version: '3'
services:dufs:image: sigoden/dufsports:- '5000:5000'volumes:- /app/dufs/data:/datacommand: /data -Arestart: always

可以设置路径别名:command: /data -A --path-prefix dufs

启动镜像

docker compose up -d

卸载镜像

docker compose down

现在可以访问 dufs 了

http://www.dtcms.com/a/350629.html

相关文章:

  • 【C++11】auto关键字:自动类型推导
  • Python爬虫实战: 爬虫常用到的技术及方案详解
  • Leetcode top100之链表排序
  • Swift 解法详解 LeetCode 362:敲击计数器,让数据统计更高效
  • 【猿人学】web第一届 第16题 js-逆向 windows蜜罐 / webpack初体验
  • 通过C#上位机串口写入和读取浮点数到stm32实战5(通过串口读取bmp280气压计的数值并在上位机显示)
  • java 并发编程八股-多线程篇
  • 【已解决】统信UOS安装后没有有线网络,缺少Chengdu Haiguang IC Design Co., Ltd. 10 Gb Ethernet网卡驱动
  • 支付宝直连商户,自动处理支付交易投诉,支持多支付宝应用
  • 【VS2022】背景设置详细教程(背景透明)
  • AI 时代“驯导师”职业发展方向探究
  • 用AI生成的一个BadgerDB的管理工具
  • 深入剖析Hugging Face Transformers中的KV Cache
  • Element plus日期选择器从今天开始、时间跨度为3天
  • 【Android 16】Android W 的冻结机制框架层分析
  • 茶艺实训室建设方案:打造沉浸式茶文化教学空间
  • SAVITECH盛微先进SAVIAUDIO音频解码芯片方案与应用
  • Chromium 源码中的单例管理:LazyInstance 与 NoDestructor 的深入解析与实战对比
  • vscode(MSVC)进行c++开发的时,在debug时查看一个eigen数组内部的数值
  • uniapp安卓真机调试问题解决总结
  • redis----list详解
  • C# 相机内存复用(减少图像采集耗时)以及行数复用
  • 自定义树形构造器
  • python项目实战 3D宠物狗
  • 关于传统的JavaWeb(Servlet+Mybatis)项目部署Tomcat后的跨域问题解决方案
  • MM-2025 | 北航双无人机协作助力视觉语言导航!AeroDuo:基于空中双机系统的无人机视觉语言导航
  • 简述mysql中索引类型有哪些,以及对数据库的性能的影响?
  • JBL音响代理——河北正娱科技的声学精品工程
  • 网络编程-HTTP
  • 插曲 - 为什么光速不变