You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.4 KiB

  1. FROM ubuntu:20.04
  2. RUN dpkg --add-architecture i386 && \
  3. apt-get update -y && \
  4. apt-get install -y software-properties-common && \
  5. apt-get update -y && \
  6. apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 wget openjdk-11-jdk git unzip && \
  7. rm -rf /var/lib/apt/lists/* && \
  8. apt-get autoremove -y && \
  9. apt-get clean
  10. ENV ANDROID_CMDLINE_TOOLS commandlinetools-linux-6609375_latest.zip
  11. ENV ANDROID_CMDLINE_TOOLS_URL https://dl.google.com/android/repository/${ANDROID_CMDLINE_TOOLS}
  12. ENV ANDROID_API_LEVELS android-30
  13. ENV ANDROID_BUILD_TOOLS_VERSION 30.0.1
  14. ENV ANDROID_HOME /usr/local/android-sdk-linux
  15. ENV ANDROID_NDK_HOME /opt/android-ndk
  16. ENV ANDROID_NDK_VERSION 21.3.6528147
  17. ENV PATH ${PATH}:${ANDROID_HOME}/cmdline-tools/tools/bin:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}
  18. ENV SRC /src
  19. RUN cd /usr/local/ \
  20. && mkdir -p ${ANDROID_HOME}/cmdline-tools \
  21. && wget -q ${ANDROID_CMDLINE_TOOLS_URL} \
  22. && unzip ${ANDROID_CMDLINE_TOOLS} \
  23. && rm ${ANDROID_CMDLINE_TOOLS} \
  24. && mv tools ${ANDROID_HOME}/cmdline-tools/ \
  25. && yes | sdkmanager --licenses \
  26. && sdkmanager "platforms;${ANDROID_API_LEVELS}" \
  27. && sdkmanager "tools" "platform-tools" "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
  28. && sdkmanager "extras;android;m2repository" "extras;google;google_play_services" "extras;google;m2repository" \
  29. && sdkmanager "ndk;${ANDROID_NDK_VERSION}" \
  30. && rm -rf /var/lib/apt/lists/*
  31. WORKDIR ${SRC}