Statistics
| Branch: | Tag: | Revision:

peerstreamer_docker / Dockerfile @ 465e4245

History | View | Annotate | Download (1.89 KB)

1
FROM debian:stable-slim
2
MAINTAINER Luca Baldesi <luca.baldesi@unitn.it>
3

    
4
# 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

    
9
# Set /peerstreamer as working directory
10
WORKDIR /peerstreamer
11

    
12
# Copy required files into the container at /peerstreamer
13
ADD requirements.txt /peerstreamer/
14

    
15
RUN mkdir /peerstreamer/serf-python
16
ADD serf-python.tar.gz /peerstreamer/serf-python/
17

    
18
# Install required packages
19
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
        gengetopt libtool automake iproute2
23

    
24
# Install python requirements
25
RUN pip install -r requirements.txt
26

    
27
# 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
RUN git clone -b master \
35
        https://ans.disi.unitn.it/redmine/peerstreamer-src.git \
36
            peerstreamer
37
RUN cd /peerstreamer/peerstreamer && make
38

    
39
# Clone psng-pyserf
40
RUN git clone -b source_broadcasting\
41
        https://ans.disi.unitn.it/redmine/psng-pyserf.git \
42
            psng-pyserf
43
RUN chmod +x psng-pyserf/psng_pyserf.py
44

    
45
RUN apt remove -y git automake \
46
        && apt autoremove -y
47

    
48
# Clean up APT when done.
49
RUN apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
50

    
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"]