This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/21736 )
Change subject: Import freeswitch Dockerfile
......................................................................
Import freeswitch Dockerfile
Use https://github.com/signalwire/freeswitch current master
(ae0444e9cbccdee55a80467d605e1e8c3363a36d) which has ancient
Docker containers.
Change-Id: Ib859b0ac869a82239a8c54c6e14ffa36e6497cd4
---
A freeswitch/Dockerfile
A freeswitch/build/freeswitch.limits.conf
A freeswitch/docker-entrypoint.sh
3 files changed, 119 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/36/21736/1
diff --git a/freeswitch/Dockerfile b/freeswitch/Dockerfile
new file mode 100644
index 0000000..ef37e93
--- /dev/null
+++ b/freeswitch/Dockerfile
@@ -0,0 +1,77 @@
+# vim:set ft=dockerfile:
+FROM debian:jessie
+
+# Source Dockerfile:
+# https://github.com/docker-library/postgres/blob/master/9.4/Dockerfile
+
+# explicitly set user/group IDs
+RUN groupadd -r freeswitch --gid=999 && useradd -r -g freeswitch --uid=999 freeswitch
+
+# grab gosu for easy step-down from root
+RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
+RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \
+ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \
+ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \
+ && gpg --verify /usr/local/bin/gosu.asc \
+ && rm /usr/local/bin/gosu.asc \
+ && chmod +x /usr/local/bin/gosu \
+ && apt-get purge -y --auto-remove ca-certificates wget
+
+# make the "en_US.UTF-8" locale so freeswitch will be utf-8 enabled by default
+RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
+ && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
+ENV LANG en_US.utf8
+
+# https://files.freeswitch.org/repo/deb/freeswitch-1.*/dists/jessie/main/binary-amd64/Packages
+
+ENV FS_MAJOR 1.6
+
+RUN sed -i "s/jessie main/jessie main contrib non-free/" /etc/apt/sources.list
+
+# https://freeswitch.org/confluence/display/FREESWITCH/Debian+8+Jessie#Debian8Jessie-InstallingfromDebianpackages
+
+RUN apt-get update && apt-get install -y curl \
+ && curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - \
+ && echo "deb http://files.freeswitch.org/repo/deb/freeswitch-$FS_MAJOR/ jessie main" > /etc/apt/sources.list.d/freeswitch.list \
+ && apt-get purge -y --auto-remove curl
+
+RUN apt-get update && apt-get install -y freeswitch-all \
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
+
+# Clean up
+RUN apt-get autoremove
+
+COPY docker-entrypoint.sh /
+## Ports
+# Open the container up to the world.
+### 8021 fs_cli, 5060 5061 5080 5081 sip and sips, 64535-65535 rtp
+EXPOSE 8021/tcp
+EXPOSE 5060/tcp 5060/udp 5080/tcp 5080/udp
+EXPOSE 5061/tcp 5061/udp 5081/tcp 5081/udp
+EXPOSE 7443/tcp
+EXPOSE 5070/udp 5070/tcp
+EXPOSE 64535-65535/udp
+EXPOSE 16384-32768/udp
+
+
+# Volumes
+## Freeswitch Configuration
+VOLUME ["/etc/freeswitch"]
+## Tmp so we can get core dumps out
+VOLUME ["/tmp"]
+
+# Limits Configuration
+COPY build/freeswitch.limits.conf /etc/security/limits.d/
+
+# Healthcheck to make sure the service is running
+SHELL ["/bin/bash"]
+HEALTHCHECK --interval=15s --timeout=5s \
+ CMD fs_cli -x status | grep -q ^UP || exit 1
+
+## Add additional things here
+
+##
+
+ENTRYPOINT ["/docker-entrypoint.sh"]
+
+CMD ["freeswitch"]
diff --git a/freeswitch/build/freeswitch.limits.conf b/freeswitch/build/freeswitch.limits.conf
new file mode 100644
index 0000000..d6568eb
--- /dev/null
+++ b/freeswitch/build/freeswitch.limits.conf
@@ -0,0 +1,15 @@
+freeswitch soft core unlimited
+freeswitch soft data unlimited
+freeswitch soft fsize unlimited
+freeswitch soft memlock unlimited
+freeswitch soft nofile 999999
+freeswitch soft rss unlimited
+freeswitch hard stack 240
+freeswitch soft cpu unlimited
+freeswitch soft nproc unlimited
+freeswitch soft as unlimited
+freeswitch soft priority -11
+freeswitch soft locks unlimited
+freeswitch soft sigpending unlimited
+freeswitch soft msgqueue unlimited
+freeswitch soft nice -11
diff --git a/freeswitch/docker-entrypoint.sh b/freeswitch/docker-entrypoint.sh
new file mode 100644
index 0000000..8b645a2
--- /dev/null
+++ b/freeswitch/docker-entrypoint.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+set -e
+
+# Source docker-entrypoint.sh:
+# https://github.com/docker-library/postgres/blob/master/9.4/docker-entrypoint.sh
+# https://github.com/kovalyshyn/docker-freeswitch/blob/vanilla/docker-entrypoint.sh
+
+if [ "$1" = 'freeswitch' ]; then
+
+ if [ ! -f "/etc/freeswitch/freeswitch.xml" ]; then
+ mkdir -p /etc/freeswitch
+ cp -varf /usr/share/freeswitch/conf/vanilla/* /etc/freeswitch/
+ fi
+
+ chown -R freeswitch:freeswitch /etc/freeswitch
+ chown -R freeswitch:freeswitch /var/{run,lib}/freeswitch
+
+ if [ -d /docker-entrypoint.d ]; then
+ for f in /docker-entrypoint.d/*.sh; do
+ [ -f "$f" ] && . "$f"
+ done
+ fi
+
+ exec gosu freeswitch /usr/bin/freeswitch -u freeswitch -g freeswitch -nonat -c
+fi
+
+exec "$@"
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/21736
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ib859b0ac869a82239a8c54c6e14ffa36e6497cd4
Gerrit-Change-Number: 21736
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201216/f4724c9c/attachment.htm>