-
-
Save rgordeev/3ce0255f2d755e38c1b7e5b3a52237ce to your computer and use it in GitHub Desktop.
Kurento Media Server with Docker and SSL support (WIP)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# stream oriented kurento | |
# | |
# VERSION 4.4.3 | |
FROM ubuntu:14.04 | |
MAINTAINER Patxi Gortázar <patxi.gortazar@gmail.com> | |
RUN apt-get update \ | |
&& apt-get -y dist-upgrade \ | |
&& apt-get install -y wget | |
RUN echo "deb http://ubuntu.kurento.org/ trusty kms6" | tee /etc/apt/sources.list.d/kurento.list \ | |
&& wget -O - http://ubuntu.kurento.org/kurento.gpg.key | apt-key add - \ | |
&& apt-get update \ | |
&& apt-get -y install kurento-media-server-6.0 \ | |
&& apt-get -y install kms-pointerdetector-6.0 \ | |
&& apt-get -y install gnutls-bin \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
EXPOSE 8888 8443 | |
RUN certtool --generate-privkey --outfile /etc/kurento/defaultCertificate.pem | |
RUN echo 'organization = your organization name' > /etc/kurento/certtool.tmpl | |
RUN certtool --generate-self-signed --load-privkey /etc/kurento/defaultCertificate.pem --template /etc/kurento/certtool.tmpl >> /etc/kurento/defaultCertificate.pem | |
RUN chown kurento /etc/kurento/defaultCertificate.pem | |
COPY ./kurento.conf.json /etc/kurento/kurento.conf.json | |
COPY ./entrypoint.sh /entrypoint.sh | |
RUN chmod +x /entrypoint.sh | |
ENV GST_DEBUG=Kurento*:5 | |
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [ ! -z "$COTURN_PORT_3478_TCP_ADDR" ]; then | |
if [ ! -z "$COTURN_PORT_3478_TCP_PORT" ]; then | |
# Generate WebRtcEndpoint configuration | |
echo "stunServerAddress=$COTURN_PORT_3478_TCP_ADDR" > /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini | |
echo "stunServerPort=$COTURN_PORT_3478_TCP_PORT" >> /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini | |
fi | |
fi | |
# Remove ipv6 local loop until ipv6 is supported | |
cat /etc/hosts | sed '/::1/d' | tee /etc/hosts > /dev/null | |
exec /usr/bin/kurento-media-server "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"mediaServer" : { | |
"resources": { | |
"exceptionLimit": "0.8", | |
"killLimit": "0.7", | |
"garbageCollectorPeriod": 240 | |
}, | |
"net" : { | |
"websocket": { | |
"port": 8888, | |
"secure": { | |
"port": 8433, | |
"certificate": "/etc/kurento/defaultCertificate.pem", | |
"password": "" | |
}, | |
"path": "kurento", | |
"threads": 10 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment