Statistics
| Branch: | Tag: | Revision:

peerstreamer_docker / Dockerfile @ 465e4245

History | View | Annotate | Download (1.89 KB)

1 740fa994 Luca Baldesi
FROM debian:stable-slim
2
MAINTAINER Luca Baldesi <luca.baldesi@unitn.it>
3 f4d22966 Nicolo' Facchi
4 740fa994 Luca Baldesi
# Install supervisord and automatic upgrade stuff
5
RUN apt-get update \
6
 && apt-get install -y supervisor unattended-upgrades cron \
7
 && rm -rf /var/lib/apt/lists/*
8 bd39d01c Nicolo' Facchi
9
# Set /peerstreamer as working directory
10
WORKDIR /peerstreamer
11
12
# Copy required files into the container at /peerstreamer
13 f4d22966 Nicolo' Facchi
ADD requirements.txt /peerstreamer/
14
15
RUN mkdir /peerstreamer/serf-python
16
ADD serf-python.tar.gz /peerstreamer/serf-python/
17 bd39d01c Nicolo' Facchi
18
# Install required packages
19 756b9cdd Nicolò Facchi
RUN apt update && apt install -y python2.7 python-pip git libmicrohttpd-dev \
20
        libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev \
21
        libglib2.0-dev libopus-dev libogg-dev libcurl4-openssl-dev pkg-config \
22 30ff79bc Luca Baldesi
        gengetopt libtool automake iproute2
23 bd39d01c Nicolo' Facchi
24
# Install python requirements
25
RUN pip install -r requirements.txt
26
27 f4d22966 Nicolo' Facchi
# Install serf-python: the local archive have beeb checked out from github.
28
# Don't use the package provided with pip because it doesn't work.
29
RUN cd /peerstreamer/serf-python && \
30
        python setup.py install
31
RUN rm -rf /peerstreamer/serf-python
32
33
# Build peerstreamer
34 465e4245 Luca Baldesi
RUN git clone -b master \
35 f4d22966 Nicolo' Facchi
        https://ans.disi.unitn.it/redmine/peerstreamer-src.git \
36
            peerstreamer
37
RUN cd /peerstreamer/peerstreamer && make
38
39
# Clone psng-pyserf
40 3909028b Luca Baldesi
RUN git clone -b source_broadcasting\
41 f4d22966 Nicolo' Facchi
        https://ans.disi.unitn.it/redmine/psng-pyserf.git \
42
            psng-pyserf
43 3909028b Luca Baldesi
RUN chmod +x psng-pyserf/psng_pyserf.py
44 f4d22966 Nicolo' Facchi
45 756b9cdd Nicolò Facchi
RUN apt remove -y git automake \
46
        && apt autoremove -y
47 f4d22966 Nicolo' Facchi
48
# Clean up APT when done.
49
RUN apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
50 740fa994 Luca Baldesi
51
COPY supervisord.conf /etc/supervisor/supervisord.conf
52
COPY cron-supervisord.conf /etc/supervisor/conf.d/cron.conf
53
COPY psng-supervisord.conf /etc/supervisor/conf.d/psng.conf
54
COPY pyserf-supervisord.conf /etc/supervisor/conf.d/pyserf.conf
55
56
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]