Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Upgrade Docker image to latest build tools (#2987)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluemarvin authored Mar 19, 2020
1 parent 4d8d17f commit 2b534a4
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
# Inspired by:
# https://hub.docker.com/r/runmymind/docker-android-sdk/~/dockerfile/

FROM ubuntu:17.10
FROM ubuntu:18.04

MAINTAINER Randall Barker "[email protected]"

# -- System -----------------------------------------------------------------------------

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update -qq

RUN apt-get install -y openjdk-8-jdk \
Expand All @@ -33,19 +35,19 @@ RUN locale-gen en_US.UTF-8

# -- Android SDK ------------------------------------------------------------------------

RUN cd /opt && wget -q https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O android-sdk.zip
RUN cd /opt && wget -q https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip -O android-sdk.zip
RUN cd /opt && unzip android-sdk.zip
RUN cd /opt && rm -f android-sdk.zip

ENV ANDROID_BUILD_TOOLS_VERSION "28.0.3"
ENV ANDROID_BUILD_TOOLS_VERSION_29 "29.0.2"
ENV ANDROID_SDK_HOME /opt
ENV ANDROID_HOME /opt
ENV PATH ${PATH}:${ANDROID_SDK_HOME}/tools/bin:${ANDROID_SDK_HOME}/platform-tools:/opt/tools:${ANDROID_SDK_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}
ENV PATH ${PATH}:${ANDROID_SDK_HOME}/tools/bin:${ANDROID_SDK_HOME}/platform-tools:/opt/tools:${ANDROID_SDK_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION_29}

RUN echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}"
RUN echo y | sdkmanager "ndk-bundle"
RUN echo y | sdkmanager "cmake;3.10.2.4988404"
RUN echo y | sdkmanager "platforms;android-28"
RUN echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION_29}" --sdk_root=$ANDROID_SDK_HOME
RUN echo y | sdkmanager "ndk-bundle" --sdk_root=$ANDROID_SDK_HOME
RUN echo y | sdkmanager "cmake;3.10.2.4988404" --sdk_root=$ANDROID_SDK_HOME
RUN echo y | sdkmanager "platforms;android-29" --sdk_root=$ANDROID_SDK_HOME

WORKDIR /opt

Expand All @@ -54,10 +56,16 @@ RUN git clone https://github.com/MozillaReality/FirefoxReality.git

# Build project and run gradle tasks once to pull all dependencies
WORKDIR /opt/FirefoxReality
RUN git config --global user.email "[email protected]"
RUN git config --global user.name "No Reply"
RUN echo sdk.dir=/opt > local.properties && echo ndk.dir=/opt/ndk-bundle >> local.properties
RUN git checkout -b update origin/gradle
RUN git rebase origin/master
RUN git submodule init
RUN git submodule update
RUN ./gradlew --no-daemon assembleNoapi
RUN ./gradlew --no-daemon clean
RUN git checkout master

# -- Cleanup ----------------------------------------------------------------------------

Expand Down

0 comments on commit 2b534a4

Please sign in to comment.