Update NGINX prefix and conf paths. Bump NGINX to 1.16.1 and FFmpeg to 4.2.1.

This commit is contained in:
Alf 2019-10-25 20:55:28 -07:00
parent 240e68b92e
commit 81a104121e
2 changed files with 12 additions and 13 deletions

View File

@ -1,6 +1,6 @@
ARG NGINX_VERSION=1.16.0
ARG NGINX_VERSION=1.16.1
ARG NGINX_RTMP_VERSION=1.2.1
ARG FFMPEG_VERSION=4.2
ARG FFMPEG_VERSION=4.2.1
##############################
@ -42,14 +42,12 @@ RUN cd /tmp && \
# Compile nginx with nginx-rtmp module.
RUN cd /tmp/nginx-${NGINX_VERSION} && \
./configure \
--prefix=/opt/nginx \
--prefix=/usr/local/nginx \
--add-module=/tmp/nginx-rtmp-module-${NGINX_RTMP_VERSION} \
--conf-path=/opt/nginx/nginx.conf \
--conf-path=/etc/nginx/nginx.conf \
--with-threads \
--with-file-aio \
--with-http_ssl_module \
--error-log-path=/opt/nginx/logs/error.log \
--http-log-path=/opt/nginx/logs/access.log \
--with-debug && \
cd /tmp/nginx-${NGINX_VERSION} && make && make install
@ -143,16 +141,17 @@ RUN apk add --update \
x264-dev \
x265-dev
COPY --from=build-nginx /opt/nginx /opt/nginx
COPY --from=build-nginx /usr/local/nginx /usr/local/nginx
COPY --from=build-ffmpeg /usr/local /usr/local
COPY --from=build-ffmpeg /usr/lib/libfdk-aac.so.2 /usr/lib/libfdk-aac.so.2
# Add NGINX config and static files.
ADD nginx.conf /opt/nginx/nginx.conf
# Add NGINX path, config and static files.
ENV PATH "${PATH}:/usr/local/nginx/sbin"
ADD nginx.conf /etc/nginx/nginx.conf
RUN mkdir -p /opt/data && mkdir /www
ADD static /www/static
EXPOSE 1935
EXPOSE 80
CMD ["/opt/nginx/sbin/nginx"]
CMD ["nginx"]

View File

@ -2,9 +2,9 @@
A Dockerfile installing NGINX, nginx-rtmp-module and FFmpeg from source with
default settings for HLS live streaming. Built on Alpine Linux.
* Nginx 1.16.0 (Stable version compiled from source)
* Nginx 1.16.1 (Stable version compiled from source)
* nginx-rtmp-module 1.2.1 (compiled from source)
* ffmpeg 4.2 (compiled from source)
* ffmpeg 4.2.1 (compiled from source)
* Default HLS settings (See: [nginx.conf](nginx.conf))
[![Docker Stars](https://img.shields.io/docker/stars/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/)
@ -63,7 +63,7 @@ http://<server ip>:8080/live/$STREAM_NAME.m3u8
```
$ ffmpeg -buildconf
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.4.0 (Alpine 6.4.0)
configuration: --prefix=/usr/local --enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libfdk-aac --enable-libass --enable-libwebp --enable-librtmp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug --disable-doc --disable-ffplay --extra-libs='-lpthread -lm'
libavutil 56. 31.100 / 56. 31.100