1. 创建一个空目录

mkdir filebrowser

2.创建docker-compose.yml文件

version: '3'
services:
  filebrowser:
    image: filebrowser/filebrowser:latest
    container_name: filebrowser
    restart: always
    ports:
      - "808980/tcp"
    networks:
      - net
    volumes:
      # 这里是挂在到我的nextcloud网盘
      - /usr/local/src/other/nextcloud/data/zyf/files:/srv 
      - ./filebrowser.db:/database.db
      - ./.filebrowser.json:/.filebrowser.json
      - /etc/localtime:/etc/localtime:ro
networks:
  net:
    driver: bridge

3. 配置

创建配置文件

# touch filebrowser.db

# mkdir srv

# cat .filebrowser.json 

{

  "port": 80,

  "baseURL": "",

  "address": "",

  "log": "stdout",

  "database": "/database.db",

  "root": "/srv"

}

4.启动服务

docker-compose up -d