Skip to content

Instantly share code, notes, and snippets.

@leoGalani
Created May 2, 2016 21:51
Show Gist options
  • Save leoGalani/1f74621b8e82bd5bc8db586d1f34b8a2 to your computer and use it in GitHub Desktop.
Save leoGalani/1f74621b8e82bd5bc8db586d1f34b8a2 to your computer and use it in GitHub Desktop.
Android Docker File StackOverflow
FROM java:8-jdk
RUN dpkg --add-architecture i386
RUN apt-get update
#current debian kernel feezes java
RUN apt-get dist-upgrade -y
RUN apt-get install ruby-full -y
RUN apt-get install -y --no-install-recommends apt-utils build-essential git ruby-dev zlib1g-dev
RUN apt-get install -y --no-install-recommends libncurses5:i386 libc6:i386 libstdc++6:i386 zlib1g:i386 wget unzip
RUN apt-get clean -y
WORKDIR /home
#SETTING SDK
RUN wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
RUN tar -xvf android-sdk_r24.4.1-linux.tgz
RUN rm -rf android-sdk_r24.4.1-linux.tgz
RUN export ANDROID_HOME=/home/android-sdk-linux/platform-tools
RUN chown -R root:root /home/android-sdk-linux/
RUN echo y |/home/android-sdk-linux/tools/android update sdk -u -a -t extra-google-m2repository
RUN echo y |/home/android-sdk-linux/tools/android update sdk -u -a -t platform-tools
RUN echo y |/home/android-sdk-linux/tools/android update sdk -u -a -t build-tools-23.0.2
RUN echo y |/home/android-sdk-linux/tools/android update sdk -u -a -t tools
RUN unzip /home/android-sdk-linux/temp/tools_r25.1.1-linux.zip -d /home/android-sdk-linux/
RUN rm -rf /home/android-sdk-linux/temp/
RUN echo y |/home/android-sdk-linux/tools/android update sdk -u -a -t android-22
RUN echo y |/home/android-sdk-linux/tools/android update sdk -u -a -t sys-img-armeabi-v7a-google_apis-22
RUN android create avd --force -n test-22 -t "android-22" --abi armeabi-v7a --tag google_apis --device "5.1in WVGA"
RUN /home/android-sdk-linux/tools/emulator -avd test-22 -no-skin -no-audio -no-window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment