Skip to content

Commit 81a1041

Browse files
committed
Update NGINX prefix and conf paths. Bump NGINX to 1.16.1 and FFmpeg to 4.2.1.
1 parent 240e68b commit 81a1041

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Dockerfile

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
ARG NGINX_VERSION=1.16.0
1+
ARG NGINX_VERSION=1.16.1
22
ARG NGINX_RTMP_VERSION=1.2.1
3-
ARG FFMPEG_VERSION=4.2
3+
ARG FFMPEG_VERSION=4.2.1
44

55

66
##############################
@@ -42,14 +42,12 @@ RUN cd /tmp && \
4242
# Compile nginx with nginx-rtmp module.
4343
RUN cd /tmp/nginx-${NGINX_VERSION} && \
4444
./configure \
45-
--prefix=/opt/nginx \
45+
--prefix=/usr/local/nginx \
4646
--add-module=/tmp/nginx-rtmp-module-${NGINX_RTMP_VERSION} \
47-
--conf-path=/opt/nginx/nginx.conf \
47+
--conf-path=/etc/nginx/nginx.conf \
4848
--with-threads \
4949
--with-file-aio \
5050
--with-http_ssl_module \
51-
--error-log-path=/opt/nginx/logs/error.log \
52-
--http-log-path=/opt/nginx/logs/access.log \
5351
--with-debug && \
5452
cd /tmp/nginx-${NGINX_VERSION} && make && make install
5553

@@ -143,16 +141,17 @@ RUN apk add --update \
143141
x264-dev \
144142
x265-dev
145143

146-
COPY --from=build-nginx /opt/nginx /opt/nginx
144+
COPY --from=build-nginx /usr/local/nginx /usr/local/nginx
147145
COPY --from=build-ffmpeg /usr/local /usr/local
148146
COPY --from=build-ffmpeg /usr/lib/libfdk-aac.so.2 /usr/lib/libfdk-aac.so.2
149147

150-
# Add NGINX config and static files.
151-
ADD nginx.conf /opt/nginx/nginx.conf
148+
# Add NGINX path, config and static files.
149+
ENV PATH "${PATH}:/usr/local/nginx/sbin"
150+
ADD nginx.conf /etc/nginx/nginx.conf
152151
RUN mkdir -p /opt/data && mkdir /www
153152
ADD static /www/static
154153

155154
EXPOSE 1935
156155
EXPOSE 80
157156

158-
CMD ["/opt/nginx/sbin/nginx"]
157+
CMD ["nginx"]

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
A Dockerfile installing NGINX, nginx-rtmp-module and FFmpeg from source with
33
default settings for HLS live streaming. Built on Alpine Linux.
44

5-
* Nginx 1.16.0 (Stable version compiled from source)
5+
* Nginx 1.16.1 (Stable version compiled from source)
66
* nginx-rtmp-module 1.2.1 (compiled from source)
7-
* ffmpeg 4.2 (compiled from source)
7+
* ffmpeg 4.2.1 (compiled from source)
88
* Default HLS settings (See: [nginx.conf](nginx.conf))
99

1010
[![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
6363
```
6464
$ ffmpeg -buildconf
6565
66-
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
66+
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
6767
built with gcc 6.4.0 (Alpine 6.4.0)
6868
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'
6969
libavutil 56. 31.100 / 56. 31.100

0 commit comments

Comments
 (0)