mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
For those who need smaller images with alpine
@ -1,5 +1,7 @@
|
|||||||
Create a `Dockerfile` with the following:
|
Create a `Dockerfile` with the following:
|
||||||
|
|
||||||
|
#### Ubuntu
|
||||||
|
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
FROM ubuntu:xenial
|
FROM ubuntu:xenial
|
||||||
|
|
||||||
@ -40,4 +42,22 @@ VOLUME ["/etc/nginx", "/var/cache/nginx"]
|
|||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Alpine
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM alpine:3.13.4 as builder
|
||||||
|
RUN apk add --update build-base git bash gcc make g++ zlib-dev linux-headers pcre-dev openssl-dev
|
||||||
|
RUN git clone https://github.com/arut/nginx-rtmp-module.git && \
|
||||||
|
git clone https://github.com/nginx/nginx.git
|
||||||
|
RUN cd nginx && ./auto/configure --add-module=../nginx-rtmp-module && make && make install
|
||||||
|
|
||||||
|
FROM alpine:3.13.4 as nginx
|
||||||
|
RUN apk add --update pcre ffmpeg
|
||||||
|
COPY --from=builder /usr/local/nginx /usr/local/nginx
|
||||||
|
ADD border.conf /usr/local/nginx/conf/nginx.conf
|
||||||
|
ENTRYPOINT ["/usr/local/nginx/sbin/nginx"]
|
||||||
|
CMD ["-g", "daemon off;"]
|
||||||
|
```
|
||||||
|
|
||||||
now build as you normally would, any other `Dockerfile`
|
now build as you normally would, any other `Dockerfile`
|
Reference in New Issue
Block a user