commit
1886f11f9b
43
Dockerfile
43
Dockerfile
@ -7,33 +7,44 @@ EXPOSE 1935
|
||||
EXPOSE 80
|
||||
|
||||
# create directories
|
||||
RUN mkdir /src && mkdir /config && mkdir /logs && mkdir /data && mkdir /static
|
||||
RUN mkdir /src /config /logs /data /static
|
||||
|
||||
# update and upgrade packages
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get clean
|
||||
RUN apt-get install -y build-essential wget
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get clean && \
|
||||
apt-get install -y --no-install-recommends build-essential \
|
||||
wget software-properties-common && \
|
||||
# ffmpeg
|
||||
RUN apt-get install -y software-properties-common
|
||||
RUN add-apt-repository ppa:mc3man/trusty-media
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y ffmpeg
|
||||
|
||||
add-apt-repository ppa:mc3man/trusty-media && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends ffmpeg && \
|
||||
# nginx dependencies
|
||||
RUN apt-get install -y libpcre3-dev zlib1g-dev libssl-dev
|
||||
RUN apt-get install -y wget
|
||||
apt-get install -y --no-install-recommends libpcre3-dev \
|
||||
zlib1g-dev libssl-dev wget && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# get nginx source
|
||||
RUN cd /src && wget http://nginx.org/download/nginx-1.6.2.tar.gz && tar zxf nginx-1.6.2.tar.gz && rm nginx-1.6.2.tar.gz
|
||||
|
||||
WORKDIR /src
|
||||
RUN wget http://nginx.org/download/nginx-1.6.2.tar.gz && \
|
||||
tar zxf nginx-1.6.2.tar.gz && \
|
||||
rm nginx-1.6.2.tar.gz && \
|
||||
# get nginx-rtmp module
|
||||
RUN cd /src && wget https://github.com/arut/nginx-rtmp-module/archive/v1.1.6.tar.gz && tar zxf v1.1.6.tar.gz && rm v1.1.6.tar.gz
|
||||
wget https://github.com/arut/nginx-rtmp-module/archive/v1.1.6.tar.gz && \
|
||||
tar zxf v1.1.6.tar.gz && \
|
||||
rm v1.1.6.tar.gz
|
||||
|
||||
# compile nginx
|
||||
RUN cd /src/nginx-1.6.2 && ./configure --add-module=/src/nginx-rtmp-module-1.1.6 --conf-path=/config/nginx.conf --error-log-path=/logs/error.log --http-log-path=/logs/access.log
|
||||
RUN cd /src/nginx-1.6.2 && make && make install
|
||||
WORKDIR /src/nginx-1.6.2
|
||||
RUN ./configure --add-module=/src/nginx-rtmp-module-1.1.6 \
|
||||
--conf-path=/config/nginx.conf \
|
||||
--error-log-path=/logs/error.log \
|
||||
--http-log-path=/logs/access.log && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
ADD nginx.conf /config/nginx.conf
|
||||
ADD static /static
|
||||
|
||||
WORKDIR /
|
||||
CMD "nginx"
|
||||
|
Loading…
Reference in New Issue
Block a user