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

Commit 2b534a4

Browse files
authored
Upgrade Docker image to latest build tools (#2987)
1 parent 4d8d17f commit 2b534a4

1 file changed

Lines changed: 16 additions & 8 deletions

File tree

tools/docker/Dockerfile

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
# Inspired by:
66
# https://hub.docker.com/r/runmymind/docker-android-sdk/~/dockerfile/
77

8-
FROM ubuntu:17.10
8+
FROM ubuntu:18.04
99

1010
MAINTAINER Randall Barker "[email protected]"
1111

1212
# -- System -----------------------------------------------------------------------------
1313

14+
ENV DEBIAN_FRONTEND=noninteractive
15+
1416
RUN apt-get update -qq
1517

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

3436
# -- Android SDK ------------------------------------------------------------------------
3537

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

40-
ENV ANDROID_BUILD_TOOLS_VERSION "28.0.3"
42+
ENV ANDROID_BUILD_TOOLS_VERSION_29 "29.0.2"
4143
ENV ANDROID_SDK_HOME /opt
4244
ENV ANDROID_HOME /opt
43-
ENV PATH ${PATH}:${ANDROID_SDK_HOME}/tools/bin:${ANDROID_SDK_HOME}/platform-tools:/opt/tools:${ANDROID_SDK_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}
45+
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}
4446

45-
RUN echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}"
46-
RUN echo y | sdkmanager "ndk-bundle"
47-
RUN echo y | sdkmanager "cmake;3.10.2.4988404"
48-
RUN echo y | sdkmanager "platforms;android-28"
47+
RUN echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION_29}" --sdk_root=$ANDROID_SDK_HOME
48+
RUN echo y | sdkmanager "ndk-bundle" --sdk_root=$ANDROID_SDK_HOME
49+
RUN echo y | sdkmanager "cmake;3.10.2.4988404" --sdk_root=$ANDROID_SDK_HOME
50+
RUN echo y | sdkmanager "platforms;android-29" --sdk_root=$ANDROID_SDK_HOME
4951

5052
WORKDIR /opt
5153

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

5557
# Build project and run gradle tasks once to pull all dependencies
5658
WORKDIR /opt/FirefoxReality
59+
RUN git config --global user.email "[email protected]"
60+
RUN git config --global user.name "No Reply"
61+
RUN echo sdk.dir=/opt > local.properties && echo ndk.dir=/opt/ndk-bundle >> local.properties
62+
RUN git checkout -b update origin/gradle
63+
RUN git rebase origin/master
5764
RUN git submodule init
5865
RUN git submodule update
5966
RUN ./gradlew --no-daemon assembleNoapi
6067
RUN ./gradlew --no-daemon clean
68+
RUN git checkout master
6169

6270
# -- Cleanup ----------------------------------------------------------------------------
6371

0 commit comments

Comments
 (0)