2018-05-27 19:29:14 +00:00
|
|
|
FROM ubuntu:16.04
|
|
|
|
|
|
|
|
RUN apt update && \
|
|
|
|
apt upgrade -y && \
|
|
|
|
apt install -y wget unzip git default-jre default-jdk
|
|
|
|
|
|
|
|
RUN mkdir /openedx
|
|
|
|
|
|
|
|
# Install Android SDK
|
|
|
|
# Inspired from https://github.com/LiveXP/docker-android-sdk/blob/master/Dockerfile
|
|
|
|
ENV ANDROID_SDK_VERSION 3859397
|
|
|
|
ENV ANDROID_SDK_PATH /openedx/android-sdk
|
|
|
|
ENV ANDROID_HOME /openedx/android-sdk
|
|
|
|
RUN mkdir /openedx/android-sdk
|
|
|
|
WORKDIR /openedx/android-sdk
|
|
|
|
RUN wget https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && \
|
|
|
|
unzip sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && \
|
|
|
|
rm sdk-tools-linux-${ANDROID_SDK_VERSION}.zip
|
|
|
|
|
2018-10-03 13:44:02 +00:00
|
|
|
# Accept licenses
|
|
|
|
RUN yes | /openedx/android-sdk/tools/bin/sdkmanager --licenses
|
|
|
|
|
2018-05-27 19:29:14 +00:00
|
|
|
# Install android app repo
|
|
|
|
RUN git clone https://github.com/edx/edx-app-android /openedx/edx-app-android
|
|
|
|
WORKDIR /openedx/edx-app-android
|
|
|
|
|
2018-10-03 13:44:02 +00:00
|
|
|
# Install gradle and all dependencies
|
|
|
|
RUN ./gradlew -v
|
|
|
|
RUN ./gradlew tasks
|
|
|
|
|
2018-05-27 19:29:14 +00:00
|
|
|
# User-customized config
|
|
|
|
COPY ./edx.properties ./OpenEdXMobile/edx.properties
|
|
|
|
RUN mkdir /openedx/config
|
|
|
|
RUN ln -s /openedx/config/gradle.properties ./OpenEdXMobile/gradle.properties
|
|
|
|
|
|
|
|
CMD ./gradlew assembleProdDebuggable && \
|
2018-10-03 13:43:21 +00:00
|
|
|
cp OpenEdXMobile/build/outputs/apk/prod/debuggable/*.apk /openedx/data/
|