fix(docker): start mediamtx-hls without shell on scratch image.

Seed shared HLS config via alpine init container and pass explicit config path for ephemeral docker run.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin
2026-05-22 16:57:04 +08:00
parent 71eb88763d
commit 7e2426339e
3 changed files with 19 additions and 8 deletions

View File

@@ -63,7 +63,7 @@ SDK **不作为构建期依赖**:将厂商提供的 Linux x86_64 动态库挂
| 部署方式 | 行为 |
|----------|------|
| **Docker Compose推荐** | 固定服务 `mediamtx-hls`(宿主机 `127.0.0.1:18888``ensure` 写共享 `mediamtx.yml``docker restart orm-mediamtx-hls``DEMO_HLS_PREVIEW_UPSTREAM=http://127.0.0.1:18888` |
| **Docker Compose推荐** | 固定服务 `mediamtx-hls`(宿主机 `127.0.0.1:18888``hls-preview-init` 种子共享卷后 MediaMTX 直接读 `/config/mediamtx.yml`(官方镜像是 scratch勿用 `/bin/sh` entrypoint`ensure` 写共享 `mediamtx.yml``docker restart orm-mediamtx-hls``DEMO_HLS_PREVIEW_UPSTREAM=http://127.0.0.1:18888` |
| **本机 uvicorn** | 未设 upstream 时按需 `docker run` 临时 MediaMTX端口默认 `127.0.0.1:18888` |
| 链路 | 行为 |