-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
66 lines (52 loc) · 1.57 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
ARG NGINX_VERSION=1.19.0
##########################
# Build the release image.
FROM ubuntu:bionic
ENV NGINX_VERSION=1.19.0
ENV TZ=Europe/Vienna
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y software-properties-common && apt-get update && add-apt-repository ppa:jonathonf/ffmpeg-4
RUN apt-get update && apt-get install -y \
ffmpeg \
build-essential \
git \
wget \
gcc \
make \
libpcre3-dev \
libssl-dev \
zlib1g-dev \
gettext-base \
certbot
RUN cd /tmp && \
git clone https://github.com/arut/nginx-rtmp-module.git && \
wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
tar xzf nginx-${NGINX_VERSION}.tar.gz && \
cd /tmp/nginx-${NGINX_VERSION} && \
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--add-module=../nginx-rtmp-module \
--conf-path=/etc/nginx/nginx.conf \
--with-threads \
--with-file-aio \
--with-cc-opt="-O3" \
--with-http_ssl_module \
--with-debug && \
make && make install
# Cleanup.
RUN rm -rf /var/cache/* /tmp/*
# Add NGINX path, config and static files.
ENV PATH "${PATH}:/usr/local/nginx/sbin"
RUN mkdir -p /live && mkdir -p /srv/www/html
RUN chmod -R 777 /live
RUN mkdir /var/lib/certbot
COPY templates /etc/nginx/templates
COPY ./static/crossdomain.xml /srv/www/html/crossdomain.xml
COPY ./static/stat.xsl /srv/www/html/stat/stat.xsl
ENV STREAMING_SERVER_DOMAIN _
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 1935
ENTRYPOINT [ "./entrypoint.sh" ]