Coder Social home page Coder Social logo

geeklok / webrtc-build-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from threema-ch/webrtc-build-docker

0.0 2.0 0.0 13 KB

Dockerfile to build the WebRTC PeerConnection for Android using the new GN based build system.

License: MIT License

Shell 100.00%

webrtc-build-docker's Introduction

WebRTC PeerConnection Build Script

This is a Dockerfile to build the WebRTC PeerConnection for Android using the new GN based build system.

NOTE: We do not provide any support related to building special versions, or related to issues with your Docker installation, or with regard to bugs in the WebRTC codebase itself. We also do not provide any support on how to integrate the resulting build into your application.

Usage

First, build the base image:

./build-base.sh

This will download lots and lots of data from the Chromium project. On our test system, it took about 1-1.5 hours with a resulting image being 47 GiB.

Then, start the actual build process based on the previously downloaded data:

./build.sh

This will take probably around 0.5-1 hour. Once the script finished, you'll get the following output in the out/ directory:

  • base_java.jar
  • base_java.interface.jar
  • libjingle_peerconnection_java.jar
  • libjingle_peerconnection_java.interface.jar
  • audio_device_java.jar
  • audio_device_java.interface.jar
  • libwebrtc.jar
  • arm/libjingle_peerconnection_so.so
  • x86/libjingle_peerconnection_so.so

If you want a non-release build, or if you want to build for other platforms, feel free to adjust the Dockerfiles.

To build a certain commit version, adjust the build/Dockerfile like this:

diff --git a/build/Dockerfile b/build/Dockerfile
index ed471e9..9198581 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile
@@ -11,7 +11,7 @@ RUN cd /webrtc/src/third_party \
 
 # Update code
 WORKDIR /webrtc/src
-RUN git checkout master && git pull && gclient sync
+RUN git checkout master && git pull && git checkout eeab9ccb2417cab18ae1681c6644c25fa4eadcd3 && gclient sync
 
 # Apply patches
 RUN mkdir /webrtc/src/patches

You'll only have to update the base image from time to time, maybe every few weeks to months. It's a big "upfront cost" but it will reduce the duration of the actual build.

Custom patches

You can also apply custom patches during the build process. Put a .patch file inside the build/patches/ directory, then it should be applied automatically.

The patch should be created using git diff inside the /webrtc/src directory (checkout of the https://chromium.googlesource.com/external/webrtc.git repo):

$ git diff > my-changes.patch

Troubleshooting

Docker: «No space left on device»

If you use Docker with the devicemapper storage driver, it's possible that you get "no space left on device" errors even though there's still disk space left. This has to do with the way the storage is managed by Docker.

To check the used storage driver, use the docker info command.

To solve this issue, either increase the devicemapper pool size or switch to a file system based storage driver like overlay2.

License

The MIT License (MIT)
Copyright (c) 2016 Threema GmbH

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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.