|
1 |
| -ARG NGINX_VERSION=1.16.0 |
| 1 | +ARG NGINX_VERSION=1.16.1 |
2 | 2 | ARG NGINX_RTMP_VERSION=1.2.1
|
3 |
| -ARG FFMPEG_VERSION=4.2 |
| 3 | +ARG FFMPEG_VERSION=4.2.1 |
4 | 4 |
|
5 | 5 |
|
6 | 6 | ##############################
|
@@ -42,14 +42,12 @@ RUN cd /tmp && \
|
42 | 42 | # Compile nginx with nginx-rtmp module.
|
43 | 43 | RUN cd /tmp/nginx-${NGINX_VERSION} && \
|
44 | 44 | ./configure \
|
45 |
| - --prefix=/opt/nginx \ |
| 45 | + --prefix=/usr/local/nginx \ |
46 | 46 | --add-module=/tmp/nginx-rtmp-module-${NGINX_RTMP_VERSION} \
|
47 |
| - --conf-path=/opt/nginx/nginx.conf \ |
| 47 | + --conf-path=/etc/nginx/nginx.conf \ |
48 | 48 | --with-threads \
|
49 | 49 | --with-file-aio \
|
50 | 50 | --with-http_ssl_module \
|
51 |
| - --error-log-path=/opt/nginx/logs/error.log \ |
52 |
| - --http-log-path=/opt/nginx/logs/access.log \ |
53 | 51 | --with-debug && \
|
54 | 52 | cd /tmp/nginx-${NGINX_VERSION} && make && make install
|
55 | 53 |
|
@@ -143,16 +141,17 @@ RUN apk add --update \
|
143 | 141 | x264-dev \
|
144 | 142 | x265-dev
|
145 | 143 |
|
146 |
| -COPY --from=build-nginx /opt/nginx /opt/nginx |
| 144 | +COPY --from=build-nginx /usr/local/nginx /usr/local/nginx |
147 | 145 | COPY --from=build-ffmpeg /usr/local /usr/local
|
148 | 146 | COPY --from=build-ffmpeg /usr/lib/libfdk-aac.so.2 /usr/lib/libfdk-aac.so.2
|
149 | 147 |
|
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 |
152 | 151 | RUN mkdir -p /opt/data && mkdir /www
|
153 | 152 | ADD static /www/static
|
154 | 153 |
|
155 | 154 | EXPOSE 1935
|
156 | 155 | EXPOSE 80
|
157 | 156 |
|
158 |
| -CMD ["/opt/nginx/sbin/nginx"] |
| 157 | +CMD ["nginx"] |
0 commit comments