2021-02-14 22:12:32 +00:00
|
|
|
ARG ARCH
|
2021-05-12 04:00:53 +00:00
|
|
|
FROM amd64/debian:10.9-slim@sha256:33965bf1eaadb19ce2f9396595c4a669e3e04c1ab8cc073b8929f529c58404bb AS base-amd64
|
|
|
|
FROM arm32v7/debian:10.9-slim@sha256:46d4252a90ec7f2399db615a8d51a7f48157485127d1cab2d2aea129773356b5 AS base-arm
|
|
|
|
FROM arm64v8/debian:10.9-slim@sha256:08d5b62029fae0db4c6255078509da3368da08dd0987ec54ebf8445f0c3a61d9 AS base-arm64
|
2021-02-14 22:12:32 +00:00
|
|
|
FROM base-${ARCH}
|
|
|
|
|
|
|
|
ENV COTURN_VERSION="4.5.2"
|
2021-02-14 22:50:54 +00:00
|
|
|
ENV PROMETHEUS_CLIENT_VERSION="v0.1.3"
|
2021-02-14 22:12:32 +00:00
|
|
|
|
|
|
|
ENV BUILD_PREFIX /usr/local/src
|
|
|
|
|
|
|
|
WORKDIR /root/coturn
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
|
|
|
|
build-essential="12.6" \
|
|
|
|
pkg-config="0.29-6" \
|
2021-03-27 23:46:41 +00:00
|
|
|
libssl-dev="1.1.1d-0+deb10u6" \
|
2021-02-14 22:12:32 +00:00
|
|
|
libevent-dev="2.1.8-stable-4" \
|
2021-05-14 23:57:30 +00:00
|
|
|
curl \
|
2021-02-14 22:12:32 +00:00
|
|
|
&& PCV=$(echo "${PROMETHEUS_CLIENT_VERSION}" | cut -c 2-) \
|
|
|
|
&& curl -L "https://github.com/digitalocean/prometheus-client-c/releases/download/${PROMETHEUS_CLIENT_VERSION}/libprom-dev-${PCV}-Linux.deb" > /tmp/libprom.deb \
|
|
|
|
&& curl -L "https://github.com/digitalocean/prometheus-client-c/releases/download/${PROMETHEUS_CLIENT_VERSION}/libpromhttp-dev-${PCV}-Linux.deb" > /tmp/libpromhttp.deb \
|
|
|
|
&& apt-get install -y /tmp/libprom.deb \
|
|
|
|
&& apt-get install -y /tmp/libpromhttp.deb \
|
|
|
|
&& rm /tmp/libprom.deb /tmp/libpromhttp.deb \
|
|
|
|
&& curl -L "https://github.com/coturn/coturn/archive/${COTURN_VERSION}.tar.gz" | tar xvz --strip 1 \
|
|
|
|
&& ./configure \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
2021-05-14 23:57:30 +00:00
|
|
|
&& rm -rf /root/coturn \
|
|
|
|
&& apt-get remove -y --purge curl
|
2021-02-14 22:12:32 +00:00
|
|
|
|
|
|
|
RUN addgroup --system turnserver \
|
|
|
|
&& adduser --system --home / --shell /bin/false --no-create-home --ingroup turnserver --disabled-password --disabled-login --gecos "turnserver daemon" turnserver
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
USER turnserver
|
|
|
|
|
|
|
|
# SUTN/TURN PORTS
|
|
|
|
EXPOSE 3478 3479 3478/udp 3479/udp 80 80/udp
|
|
|
|
EXPOSE 5349 5350 5349/udp 5350/udp 443 443/udp
|
|
|
|
# CLI
|
|
|
|
EXPOSE 5766
|
|
|
|
# Relay Ports
|
|
|
|
EXPOSE 49152-65535 49152-65535/udp
|
|
|
|
# Prometheus
|
|
|
|
EXPOSE 9641
|
|
|
|
|
2021-03-27 23:46:41 +00:00
|
|
|
ENTRYPOINT ["turnserver", "--pidfile", "/var/tmp/turnserver.pid"]
|