| 1234567891011121314151617181920212223242526272829 |
- FROM debian:stretch
- RUN apt update
- RUN apt install -y git autoconf automake build-essential libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texi2html zlib1g-dev wget yasm libdvdnav4 libdvdread4 libvpx. libx264. libpcre3 libpcre3-dev libssl-dev unzip nano htop cron
- ENV TZ=Europe/Madrid
- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- RUN mkdir -p /builder/ffmpeg /hls /save /var/log/nginx/ && chmod -R 777 /hls
- COPY ./conf/clear.sh /hls
- RUN chmod +x /hls/clear.sh
- COPY ./conf/crontab /etc/cron.d/clear-task
- RUN chmod 0644 /etc/cron.d/clear-task
- RUN crontab /etc/cron.d/clear-task
- RUN wget https://ffmpeg.org/releases/ffmpeg-4.1.3.tar.bz2 -O /builder/ffmpeg.tar.bz2
- RUN wget https://nginx.org/download/nginx-1.14.2.tar.gz -O /builder/nginx.tar.gz
- RUN wget https://github.com/arut/nginx-rtmp-module/archive/master.zip -O /builder/rtmp_nginx.zip
- RUN cd /builder && tar -zxvf nginx.tar.gz && unzip rtmp_nginx.zip && ls
- RUN cd /builder/nginx-1.14.2/ && ./configure --add-module=../nginx-rtmp-module-master
- RUN cd /builder/nginx-1.14.2/ && make -j12
- RUN cd /builder/nginx-1.14.2/ && make install
- RUN tar xjf /builder/ffmpeg.tar.bz2 -C /builder/ffmpeg --strip-components=1
- WORKDIR /builder/ffmpeg
- RUN ./configure --enable-nonfree --enable-libx264 --enable-gpl
- RUN make -j12; make install
- COPY ./conf/nginx.conf /usr/local/nginx/conf
- COPY ./conf/hls.sh /opt/
- RUN chmod +x /opt/hls.sh
- WORKDIR /usr/local/nginx/sbin
- CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]
- RUN cron
- RUN crontab -l
|