Browse Source

Update dockerfile

master
blallo 1 year ago
parent
commit
aa8dffc6f7
Signed by: blallo GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 18 additions and 21 deletions
  1. +18
    -21
      Dockerfile

+ 18
- 21
Dockerfile View File

@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

RUN dpkg --add-architecture i386 && \
apt-get update -y && \
@@ -9,28 +9,25 @@ RUN dpkg --add-architecture i386 && \
apt-get autoremove -y && \
apt-get clean

ENV ANDROID_SDK_FILENAME android-sdk_r24.4.1-linux.tgz
ENV ANDROID_SDK_URL https://dl.google.com/android/${ANDROID_SDK_FILENAME}
ENV ANDROID_API_LEVELS android-28
ENV ANDROID_BUILD_TOOLS_VERSION 28.0.3
ENV ANDROID_CMDLINE_TOOLS commandlinetools-linux-6609375_latest.zip
ENV ANDROID_CMDLINE_TOOLS_URL https://dl.google.com/android/repository/${ANDROID_CMDLINE_TOOLS}
ENV ANDROID_API_LEVELS android-30
ENV ANDROID_BUILD_TOOLS_VERSION 30.0.1
ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV ANDROID_NDK_HOME /opt/android-ndk
ENV ANDROID_NDK_VERSION r20
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}
ENV ANDROID_NDK_VERSION 21.3.6528147
ENV PATH ${PATH}:${ANDROID_HOME}/cmdline-tools/tools/bin:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}
ENV SRC /src
RUN cd /usr/local/ \
&& wget -q ${ANDROID_SDK_URL} \
&& tar -xzf ${ANDROID_SDK_FILENAME} \
&& rm ${ANDROID_SDK_FILENAME} \
&& echo y | android update sdk --no-ui -a --filter ${ANDROID_API_LEVELS} \
&& echo y | android update sdk --no-ui -a --filter extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository \
&& echo y | android update sdk --no-ui -a --filter tools,platform-tools,build-tools-${ANDROID_BUILD_TOOLS_VERSION} \
&& rm -rf ${ANDROID_HOME}/tools \
&& mkdir /opt/android-ndk-tmp \
&& cd /opt/android-ndk-tmp \
&& wget -q https://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip \
&& unzip -q android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip \
&& mv ./android-ndk-${ANDROID_NDK_VERSION} ${ANDROID_NDK_HOME} \
&& cd ${ANDROID_NDK_HOME} \
&& rm -rf /opt/android-ndk-tmp
&& mkdir -p ${ANDROID_HOME}/cmdline-tools \
&& wget -q ${ANDROID_CMDLINE_TOOLS_URL} \
&& unzip ${ANDROID_CMDLINE_TOOLS} \
&& rm ${ANDROID_CMDLINE_TOOLS} \
&& mv tools ${ANDROID_HOME}/cmdline-tools/ \
&& yes | sdkmanager --licenses \
&& sdkmanager "platforms;${ANDROID_API_LEVELS}" \
&& sdkmanager "tools" "platform-tools" "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
&& sdkmanager "extras;android;m2repository" "extras;google;google_play_services" "extras;google;m2repository" \
&& sdkmanager "ndk;${ANDROID_NDK_VERSION}" \
&& rm -rf /var/lib/apt/lists/*
WORKDIR ${SRC}

Loading…
Cancel
Save