mediamtx/Dockerfile
2025-06-16 15:37:44 +07:00

27 lines
752 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# официальный Mediamtx с FFmpeg
FROM bluenviron/mediamtx:latest-ffmpeg
# Установка зависимостей для мониторинга
RUN apk add --no-cache \
htop \
curl
# Создание директорий для конфигов и записей
RUN mkdir -p \
/etc/mediamtx \
/var/lib/mediamtx/recordings \
/var/lib/mediamtx/cache
# Открываем порты:
# - 1935 RTMP
# - 8888 HTTP/API/WebRTC
# - 8554 RTSP
# - 8889 WebRTC (UDP)
EXPOSE 1935 8888 8554 8889/udp
# Healthcheck для мониторинга
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost:8888/v3/paths/list || exit 1
# Команда запуска с логированием
CMD ["mediamtx"]