portmap / Dockerfile
blenders
ghhh
e83c819
# 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"]