nginx-rtmp-dockerfile/Dockerfile

51 lines
1.3 KiB
Docker
Raw Normal View History

FROM ubuntu:trusty
2015-03-09 20:40:56 +00:00
ENV DEBIAN_FRONTEND noninteractive
ENV PATH $PATH:/usr/local/nginx/sbin
2015-03-09 20:40:56 +00:00
EXPOSE 1935
EXPOSE 80
# create directories
RUN mkdir /src /config /logs /data /static
2015-03-09 20:40:56 +00:00
# update and upgrade packages
RUN apt-get update && \
apt-get upgrade -y && \
apt-get clean && \
apt-get install -y --no-install-recommends build-essential \
wget software-properties-common && \
2015-03-09 20:40:56 +00:00
# ffmpeg
add-apt-repository ppa:mc3man/trusty-media && \
apt-get update && \
apt-get install -y --no-install-recommends ffmpeg && \
2015-03-09 20:40:56 +00:00
# nginx dependencies
apt-get install -y --no-install-recommends libpcre3-dev \
zlib1g-dev libssl-dev wget && \
rm -rf /var/lib/apt/lists/*
2015-03-09 20:40:56 +00:00
# get nginx source
WORKDIR /src
2017-07-12 14:55:19 +00:00
RUN wget http://nginx.org/download/nginx-1.7.5.tar.gz && \
tar zxf nginx-1.7.5.tar.gz && \
rm nginx-1.7.5.tar.gz && \
2015-03-09 20:40:56 +00:00
# get nginx-rtmp module
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
2015-03-09 20:40:56 +00:00
# compile nginx
WORKDIR /src/nginx-1.7.5
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
2015-03-09 20:40:56 +00:00
ADD nginx.conf /config/nginx.conf
ADD static /static
WORKDIR /
2015-03-09 20:40:56 +00:00
CMD "nginx"