Statistics
| Branch: | Tag: | Revision:

peerstreamer_docker / Dockerfile @ 756b9cdd

History | View | Annotate | Download (1.68 KB)

1
# http://phusion.github.io/baseimage-docker/
2
FROM phusion/baseimage:0.9.22
3

    
4
# Use baseimage-docker's init system.
5
CMD ["/sbin/my_init"]
6

    
7
# Set /peerstreamer as working directory
8
WORKDIR /peerstreamer
9

    
10
# Copy required files into the container at /peerstreamer
11
ADD requirements.txt /peerstreamer/
12

    
13
RUN mkdir /peerstreamer/serf-python
14
ADD serf-python.tar.gz /peerstreamer/serf-python/
15

    
16
# Install required packages
17
RUN apt update && apt install -y python2.7 python-pip git libmicrohttpd-dev \
18
        libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev \
19
        libglib2.0-dev libopus-dev libogg-dev libcurl4-openssl-dev pkg-config \
20
        gengetopt libtool automake
21

    
22
# Install python requirements
23
RUN pip install -r requirements.txt
24

    
25
# Install serf-python: the local archive have beeb checked out from github.
26
# Don't use the package provided with pip because it doesn't work.
27
RUN cd /peerstreamer/serf-python && \
28
        python setup.py install
29
RUN rm -rf /peerstreamer/serf-python
30

    
31
# Build peerstreamer
32
RUN git clone -b webrtp \
33
        https://ans.disi.unitn.it/redmine/peerstreamer-src.git \
34
            peerstreamer
35
RUN cd /peerstreamer/peerstreamer && make
36

    
37
# Clone psng-pyserf
38
RUN git clone \
39
        https://ans.disi.unitn.it/redmine/psng-pyserf.git \
40
            psng-pyserf
41

    
42
RUN apt remove -y git automake \
43
        && apt autoremove -y
44

    
45
# Create script for running psng-pyserf service
46
RUN mkdir /etc/service/psng-pyserf
47
ADD psng-pyserf.sh /etc/service/psng-pyserf/run
48

    
49
# Create script for running peerstreamer
50
RUN mkdir /etc/service/peerstreamer
51
ADD peerstreamer.sh /etc/service/peerstreamer/run
52

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