forked from JasonRivers/Docker-nginx-rtmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (58 loc) · 1.27 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM alpine:latest as builder
MAINTAINER Jason Rivers <[email protected]>
ARG NGINX_VERSION=1.15.3
ARG NGINX_RTMP_VERSION=1.2.1
RUN apk update && \
apk add \
git \
gcc \
binutils \
gmp \
isl \
libgomp \
libatomic \
libgcc \
openssl \
pkgconf \
pkgconfig \
mpfr3 \
mpc1 \
libstdc++ \
ca-certificates \
libssh2 \
curl \
expat \
pcre \
musl-dev \
libc-dev \
pcre-dev \
zlib-dev \
openssl-dev \
curl \
make
RUN cd /tmp/ && \
curl --remote-name http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
git clone https://github.com/arut/nginx-rtmp-module.git -b v${NGINX_RTMP_VERSION}
RUN cd /tmp && \
tar xzf nginx-${NGINX_VERSION}.tar.gz && \
cd nginx-${NGINX_VERSION} && \
./configure \
--prefix=/opt/nginx \
--with-http_ssl_module \
--add-module=../nginx-rtmp-module && \
make && \
make install
FROM alpine:latest
RUN apk update && \
apk add \
openssl \
libstdc++ \
ca-certificates \
pcre
COPY --from=0 /opt/nginx /opt/nginx
COPY --from=0 /tmp/nginx-rtmp-module/stat.xsl /opt/nginx/conf/stat.xsl
RUN rm /opt/nginx/conf/nginx.conf
ADD run.sh /
EXPOSE 1935
EXPOSE 8080
CMD /run.sh