GithubHelp home page GithubHelp logo

xueshiqiao / webrtc-docker Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 40 KB

duplicated of https://github.com/Piasy/WebRTC-Docker.git

License: MIT License

Dockerfile 9.42% Python 5.75% JavaScript 2.20% Shell 80.20% C++ 2.42%

webrtc-docker's Introduction

WebRTC-Docker

Out-of-the-box docker images for AppRTC dev/test purpose.

AppRTC-Server

docker run --rm \
  -p 8080:8080 -p 8089:8089 -p 3478:3478 -p 3478:3478/udp -p 3033:3033 \
  -p 59000-65000:59000-65000/udp \
  -e PUBLIC_IP=<server public IP> \
  -v <path to constants.py parent folder>:/apprtc_configs \
  -t -i piasy/apprtc-server

About port publish:

  • 8080 is used for room server;
  • 8089 is used for signal server;
  • 3033 is used for ICE server;
  • 3478 and 59000-65000 is used for TURN/STUN server;

So make sure your firewall has opened those ports.

Note that publish range ports could be very slow and memory consuming, we can either replace all -p options into a single --net=host option, or disable userland proxy, see detail info in this issue.

About how to modify constants.py, see this example, ICE_SERVER_BASE_URL, ICE_SERVER_URL_TEMPLATE and WSS_INSTANCES has been modified.

WebRTC-Build

Credit: the build script is based on pristineio/webrtc-build-scripts.

docker run --rm \
  -e ENABLE_SHADOW_SOCKS=true \
  -e SHADOW_SOCKS_SERVER_ADDR=<your shadowsocks server ip> \
  -e SHADOW_SOCKS_SERVER_PORT=<your shadowsocks server port> \
  -e SHADOW_SOCKS_ENC_METHOD=<your shadowsocks encrypt method> \
  -e SHADOW_SOCKS_ENC_PASS=<your shadowsocks encrypt password> \
  -v <path to place webrtc source>:/webrtc \
  -t -i piasy/webrtc-build

Note: if your encrypt password contains special characters, remember to escape it with \, e.g. &bDmc! to \&bDmc\!.

If you don't need run shadowsocks proxy, you can run:

docker run --rm \
  -e ENABLE_SHADOW_SOCKS=false \
  -v <path to place webrtc source>:/webrtc \
  -t -i piasy/webrtc-build

After the docker image started, to get/update WebRTC code, run get_webrtc, to build WebRTC Android demo, run build_apprtc.

To get WebRTC code from a custom url, e.g. https://webrtc.googlesource.com/src.git, run USER_WEBRTC_URL=https://webrtc.googlesource.com/src.git get_webrtc. To create debug build, run WEBRTC_DEBUG=true build_apprtc.

Only Android is supported now, iOS support is working on, stay tuned!

webrtc-docker's People

Contributors

piasy avatar xueshiqiao avatar hazer avatar

Forkers

mehome

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.