Spaces:
Paused
Paused
File size: 2,264 Bytes
913eba3 a14be78 913eba3 9e282ee e688918 913eba3 e83c819 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# Dockerfile — coturn + playit (Option 1, noninteractive install)
FROM coturn/coturn:edge-debian
# Build args (change if upstream playit repo changes)
# Set timezone and noninteractive frontend to avoid debconf prompts
ENV DEBIAN_FRONTEND=noninteractive \
TZ=Etc/UTC \
LANG=C.UTF-8
USER root
# Install required packages, add playit apt repo, install playit package
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg \
dirmngr \
tzdata \
gettext-base \
; \
# ensure tzdata doesn't prompt (already set TZ env); configure timezone non-interactively
ln -fs /usr/share/zoneinfo/$TZ /etc/localtime; \
dpkg-reconfigure --frontend noninteractive tzdata || true; \
# prepare apt trusted key location
apt-get update; \
# Install playit, telling dpkg to accept default config answers if asked
#apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" playit; \
# cleanup apt caches
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/*
RUN useradd -m -u 1000 appuser || true; \
mkdir -p /etc/coturn /var/lib/coturn /home/appuser/app; \
chown -R appuser:appuser /home/appuser /var/lib/coturn
WORKDIR /home/appuser/app
# Copy optional local coturn config; prefer mounting at runtime for secrets
COPY turnserver.conf /etc/coturn/turnserver.conf
#COPY private.pem /home/appuser/app/private.pem
#RUN chmod +x /home/appuser/app/private.pem
#RUN ssh -i /home/appuser/app/private.pem blendersb.turn@blendersb-45318.portmap.host -N -R 45318:localhost:7860
# Copy entrypoint (make sure you have entrypoint.sh in build context)
COPY init.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# Expose typical ports
# EXPOSE 3478/tcp 3478/udp 5349/tcp 5349/udp 7860/tcp
EXPOSE 7860 5349 50000-50010/udp
USER root
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
#CMD ["echo", "All Started"]
CMD ["turnserver", "-c", "/etc/coturn/turnserver.conf", "--listening-port=7860","--tls-listening-port=5349","--user=myuser:mypassword","--log-file=stdout","--simple-log", "--no-cli", "--log-file=stdout"]
|