配置文件根据https://www.cnblogs.com/Yogile/p/17121337.html结合个人情况修改
以下为原博客
docker-compose.yaml :
version: '3.2'
services:
  bilirec:
    restart: unless-stopped
    image: bililive/recorder:2.6
    container_name: bilirec
    ports:
      - 10023:2356
    volumes:
      - /mnt/user/appdata/bilirec/rec:/rec
      - /mnt/user/appdata/bilirec/ssl:/ssl
      - /mnt/user/appdata/bilirec/file:/file
      - /mnt/user/appdata/bilirec/logs:/app/logs
    command: run --bind "https://*:2356" --cert-pem-path "/ssl/<example>.pem" --cert-key-path "/ssl/<example>.key" /rec
关于使用镜像
为后续更新镜像,建议不使用 latest 后缀,使用最新的明确标志启动容器。后续需要更新仅下载新的容器,更改 docker-compose.yaml 中 image: bililive/recorder:x.x 即可。
关于 volumes
- /rec:作为- "工作目录",用于存储录播配置和录播- .flv视频文件。
- /ssl:作为 Nginx 证书存储目录。
- /file:官方文档中指出:- 启用 HTTP 服务之后,默认在 - /file路径下会提供整个录播工作目录的内容。可以通过- --enable-file-browser false来禁用。
- /logs:作为日志目录。
关于 command
- 强烈建议根据官方文档配置 Basic 登录,或者自己套用一个成熟安全的登录模块。本人使用时仅在 LAN 网服务器使用,有防火墙和入侵检测,故未开启 Basic 登录。 
- HTTP(S) 配置:未配置 SSL 证书的,仅配置 - --bind "http://*:2356";需配置 SSL 证书的,修改监听网址,- --bind "https://*:2356"。
修改后
version: '3.2'
services:
  bilirec:
    image: bililive/recorder:2.8.1
    container_name: bilirec
    network_mode: "bridge"
    ports:
      - 2356:2356
    volumes:
      - ./:/rec
      - ./file:/file
      - ./logs:/app/logs
    command: run --bind "http://*:2356" /rec