...
 
Commits (2)
FROM docker.mjdsystems.ca/docker/debian
ENV SDK_TOOLS=sdk-tools-linux-4333796.zip
ENV SDK_TOOLS=commandlinetools-linux-6514223_latest.zip
# Installing openjdk 11
RUN apt-get -y update && apt-get install --no-install-recommends -y wget unzip openjdk-11-jdk-headless libjaxb-java && rm /var/lib/apt/lists/* /var/cache/apt/* -rf
#Installing android sdk
RUN cd /opt && mkdir android-sdk-linux && cd android-sdk-linux && mkdir add-ons platforms platform-tools temp
RUN cd /opt/android-sdk-linux && wget https://dl.google.com/android/repository/$SDK_TOOLS && unzip $SDK_TOOLS && rm $SDK_TOOLS
ENV ANDROID_HOME=/opt/android-sdk-linux PATH=$PATH:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools/bin
RUN sed '/^CLASSPATH=/a CLASSPATH=/usr/share/java/jaxb-api.jar:/usr/share/java/jaxb-impl.jar:/usr/share/java/jaxb-core.jar:/usr/share/java/jaxb-jxc.jar:/usr/share/java/jaxb-xjc.jar:/usr/share/java/javax.activation.jar:"$CLASSPATH"' -i /opt/android-sdk-linux/tools/bin/sdkmanager /opt/android-sdk-linux/tools/bin/avdmanager
RUN cd /opt && mkdir android-sdk-linux && cd android-sdk-linux && mkdir cmdline-tools
RUN cd /opt/android-sdk-linux/cmdline-tools && wget https://dl.google.com/android/repository/$SDK_TOOLS && unzip $SDK_TOOLS && rm $SDK_TOOLS
ENV ANDROID_HOME=/opt/android-sdk-linux PATH=$PATH:/opt/android-sdk-linux/cmdline-tools/tools:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/cmdline-tools/tools/bin
RUN sed '/^CLASSPATH=/a CLASSPATH=/usr/share/java/jaxb-api.jar:/usr/share/java/jaxb-impl.jar:/usr/share/java/jaxb-core.jar:/usr/share/java/jaxb-jxc.jar:/usr/share/java/jaxb-xjc.jar:/usr/share/java/javax.activation.jar:"$CLASSPATH"' -i /opt/android-sdk-linux/cmdline-tools/tools/bin/sdkmanager /opt/android-sdk-linux/cmdline-tools/tools/bin/avdmanager
RUN yes |sdkmanager "platform-tools" "extras;android;m2repository"