Created
June 3, 2020 17:05
-
-
Save vrendina/1ccc8af43b0e71e4ae5579f264810849 to your computer and use it in GitHub Desktop.
Dockerfile for building WebRTC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Copy the Dockerfile inside a new directory | |
# 2. Create the Docker image | |
# docker build -t [image-name] . | |
# 3. Launch the Docker image providing a directory to pull down the source code | |
# docker run -it --rm -v [path to source]:/src [image-name] | |
# 4. Follow instructions on http://webrtc.github.io/webrtc-org/native-code/android/ | |
#----------------- Begin Dockerfile Below ----------------- | |
FROM ubuntu:14.04 | |
# Update apt cache | |
RUN dpkg --add-architecture i386 && apt-get update | |
# Install base dependencies | |
RUN apt-get install -y --no-install-recommends \ | |
vim \ | |
git \ | |
curl \ | |
wget \ | |
apt-utils \ | |
ca-certificates \ | |
python \ | |
lbzip2 \ | |
pkg-config \ | |
software-properties-common | |
# Add Java 8 PPA | |
RUN add-apt-repository -y ppa:openjdk-r/ppa \ | |
&& apt-get update | |
# Install android compile dependencies | |
RUN apt-get install -y --no-install-recommends \ | |
build-essential \ | |
openjdk-8-jre \ | |
openjdk-8-jdk \ | |
ant \ | |
libc6:i386 \ | |
libncurses5:i386 \ | |
libstdc++6:i386 \ | |
lib32z1 \ | |
libbz2-1.0:i386 | |
# Select Java 8 | |
RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java && \ | |
update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac && \ | |
update-alternatives --set jexec /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec && \ | |
update-alternatives --set keytool /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool | |
# Get Chromium depot tools | |
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /opt/depot_tools | |
ENV PATH /opt/depot_tools:$PATH | |
WORKDIR /src | |
ENTRYPOINT /bin/bash -i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment