Coder Social home page Coder Social logo

turn-server-docker-image's Introduction

Docker image for TURN server

A Docker container with the Coturn TURN server.

Run the container

docker run \
  -d \
  -p 3478:3478 \
  -p 3478:3478/udp \
  -p 65435-65535:65435-65535/udp \
  --restart=always \
  --name coturn \
  boldt/coturn

Environment variables

This image supports some environment variables:

  • USERNAME: Username needed for turn. Defaults to username
  • PASSWORD: Password needed for turn. Defaults ro password
  • REALM: Realm needed for turn. Defaults to realm
  • MIN_PORT: This defines the min-port for the range used by turn. Defaults to 65435
  • MAX_PORT: This defines the max-port for the range used by turn. Defaults to 65535

An example:

# This makes sure, that the min- and max-port is the same for all environment variables
export MIN_PORT=50000
export MAX_PORT=50010
docker run \
  -d \
  -p 3478:3478 \
  -p 3478:3478/udp \
  -p ${MIN_PORT}-${MAX_PORT}:${MIN_PORT}-${MAX_PORT}/udp \
  -e USERNAME=another_user \
  -e PASSWORD=another_password \
  -e REALM=another_realm \
  -e MIN_PORT=${MIN_PORT} \
  -e MAX_PORT=${MAX_PORT} \
  --restart=always \
  --name coturn \
  boldt/coturn

Certificates

Store the cert under /opt/cert.pem and the key under /opt/pkey.pem and mount them as volumes:

docker run \
  -d \
  -p 3478:3478 \
  -p 3478:3478/udp \
  -p 65435-65535:65435-65535/udp \
  --volume /opt/cert.pem:/etc/ssl/turn_server_cert.pem \
  --volume /opt/pkey.pem:/etc/ssl/turn_server_pkey.pem \
  --restart=always \
  --name coturn \
  boldt/coturn

Debugging

docker logs coturn
docker exec -it coturn /bin/bash

Build and push the container

(For own documentation)

# Clone
git clone git clone [email protected]:boldt/turn-server-docker-image.git

# Build
docker build -t boldt/coturn .

# Tag
VERSION=0.0.2
docker tag boldt/coturn boldt/coturn:$VERSION

# Push
docker push boldt/coturn:latest
docker push boldt/coturn:$VERSION

Thanks

The initial image of this image was created by anastasiia-zolochevska/turn-server-docker-image

turn-server-docker-image's People

Contributors

anastasiia-zolochevska avatar boldt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.