epicmorg/balancer:rtmp-hls

This commit is contained in:
STAM 2020-08-04 17:33:16 +03:00
parent 092e7439f4
commit bd9af5c7cc
5 changed files with 140 additions and 36 deletions

View File

@ -1,20 +1,71 @@
##### Building the final image #####
FROM epicmorg/balancer
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
ARG DEBIAN_FRONTEND=noninteractive
ARG NGINX_RTMP_MODULE_VERSION=1.2.1
# Install dependencies
RUN apt-get update && \
apt-get install -y \
tree ca-certificates openssl libpcre3-dev \
librtmp1 libtheora0 libvorbis-dev libmp3lame0 \
libx264-dev libx265-dev && \
wget http://ftp.br.debian.org/debian/pool/main/libv/libvpx/libvpx4_1.6.1-3+deb9u2_amd64.deb && \
dpkg -i libvpx4_1.6.1-3+deb9u2_amd64.deb && \
rm -rfv libvpx4_1.6.1-3+deb9u2_amd64.de && \
rm -rfv /var/lib/apt/lists/*
##################################################################
# sid sources list
##################################################################
RUN rm -rfv /etc/apt/sources.list
COPY sources.list.d/sources.sid.list /etc/apt/sources.list
RUN apt update
RUN mkdir -p /usr/share/nginx/html /mnt/hls /mnt/dash /tmp/build && \
##################################################################
# installing utils
##################################################################
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && \
apt-get install -y --allow-unauthenticated \
libpcre3-dev \
librtmp1 \
libtheora0 \
libvorbis-dev \
libmp3lame0 \
libx264-dev \
libx265-dev
##################################################################
# stretch sources list + libvpx
##################################################################
RUN rm -rfv /etc/apt/sources.list
COPY sources.list.d/sources.stretch.list /etc/apt/sources.list
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && \
apt-get install -y --allow-unauthenticated \
libvpx4
##################################################################
# buster sources list + libvpx
##################################################################
RUN rm -rfv /etc/apt/sources.list
COPY sources.list.d/sources.buster.list /etc/apt/sources.list
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && \
apt-get install -y --allow-unauthenticated \
libvpx5
##################################################################
# sid sources list + libvpx
##################################################################
RUN rm -rfv /etc/apt/sources.list
COPY sources.list.d/sources.sid.list /etc/apt/sources.list
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get update && \
apt-get install -y --allow-unauthenticated \
libvpx6
##################################################################
# installing deps for rtmp module
##################################################################
RUN mkdir -p /usr/share/nginx/html \
/mnt/hls \
/mnt/dash \
/tmp/build && \
cd /tmp/build && \
wget https://github.com/arut/nginx-rtmp-module/archive/v${NGINX_RTMP_MODULE_VERSION}.tar.gz && \
tar -zxf v${NGINX_RTMP_MODULE_VERSION}.tar.gz && \
@ -23,18 +74,35 @@ RUN mkdir -p /usr/share/nginx/html /mnt/hls /mnt/dash /tmp/build && \
rm -rf /tmp/build
# Forward logs to Docker
##################################################################
# Forward logs to Docker
##################################################################
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log
# Copy nginx config file to container
##################################################################
# Copy nginx config file to container
##################################################################
RUN rm -rfv /etc/nginx/nginx.conf
COPY conf/nginx.conf /etc/nginx/nginx.conf
# Copy html players to container
##################################################################
# Copy html players to container
##################################################################
COPY players /usr/share/nginx/html/players
##################################################################
# cleaninig up
##################################################################
RUN apt clean -y && \
apt autoclean -y && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /var/cache/apt/archives/*.deb
EXPOSE 1935
EXPOSE 8080

View File

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2019 Tareq Alqutami
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,19 @@
#main
deb http://ftp.ru.debian.org/debian/ buster main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster main contrib non-free
deb http://ftp.ru.debian.org/debian/ buster-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ buster-backports main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster-backports main contrib non-free
deb http://ftp.ru.debian.org/debian/ buster-proposed-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ buster-proposed-updates main contrib non-free
#security
deb http://ftp.ru.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian-security/ buster/updates main contrib non-free
##multimedia
#deb http://ftp.ru.debian.org/debian-multimedia/ buster main non-free
#deb-src http://ftp.ru.debian.org/debian-multimedia/ buster main non-free
#deb http://ftp.ru.debian.org/debian-multimedia/ buster-backports main
#deb-src http://ftp.ru.debian.org/debian-multimedia/ buster-backports main

View File

@ -0,0 +1,19 @@
#main
deb http://ftp.ru.debian.org/debian/ sid main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ sid main contrib non-free
deb http://ftp.ru.debian.org/debian/ testing-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ testing-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ testing-proposed-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ testing-proposed-updates main contrib non-free
#backports
#deb http://ftp.ru.debian.org/debian/ testing-backports main contrib non-free
#deb-src http://ftp.ru.debian.org/debian/ testing-backports main contrib non-free
#security
deb http://ftp.ru.debian.org/debian-security/ testing-security main contrib non-free
deb-src http://ftp.ru.debian.org/debian-security/ testing-security main contrib non-free
##multimedia
#deb http://ftp.ru.debian.org/debian-multimedia/ sid main non-free
#deb-src http://ftp.ru.debian.org/debian-multimedia/ sid main non-free

View File

@ -0,0 +1,19 @@
#main
deb http://ftp.ru.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ stretch main contrib non-free
deb http://ftp.ru.debian.org/debian/ stretch-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ stretch-updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ stretch-backports main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ stretch-backports main contrib non-free
deb http://ftp.ru.debian.org/debian/ stretch-proposed-updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian/ stretch-proposed-updates main contrib non-free
#security
deb http://ftp.ru.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://ftp.ru.debian.org/debian-security/ stretch/updates main contrib non-free
##multimedia
#deb http://ftp.ru.debian.org/debian-multimedia/ stretch main non-free
#deb-src http://ftp.ru.debian.org/debian-multimedia/ stretch main non-free
#deb http://ftp.ru.debian.org/debian-multimedia/ stretch-backports main
#deb-src http://ftp.ru.debian.org/debian-multimedia/ stretch-backports main