mirror of
https://github.com/MedzikUser/docker-android-sdk
synced 2024-08-15 03:18:15 +00:00
Compare commits
2 commits
b38e30dfad
...
848fcbb756
Author | SHA1 | Date | |
---|---|---|---|
848fcbb756 | |||
5bd1a23645 |
1 changed files with 56 additions and 57 deletions
113
Dockerfile
113
Dockerfile
|
@ -2,70 +2,69 @@ FROM ubuntu:focal
|
|||
|
||||
USER root
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV DEBIAN_FRONTEND "noninteractive"
|
||||
|
||||
ENV ANDROID_HOME=/opt/android-sdk-linux \
|
||||
LANG=en_US.UTF-8 \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
LANGUAGE=en_US:en
|
||||
|
||||
ENV ANDROID_SDK_ROOT=$ANDROID_HOME
|
||||
ENV PATH=${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/emulator:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${PATH}
|
||||
ENV ANDROID_HOME "/opt/android-sdk-linux"
|
||||
ENV ANDROID_SDK_ROOT "$ANDROID_HOME"
|
||||
ENV LANG "en_US.UTF-8"
|
||||
ENV LC_ALL "en_US.UTF-8"
|
||||
ENV LANGUAGE "en_US:en"
|
||||
ENV PATH "${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/emulator:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${PATH}"
|
||||
|
||||
# comes from https://developer.android.com/studio/#command-tools
|
||||
ENV ANDROID_SDK_TOOLS_FILE_NAME commandlinetools-linux-7583922_latest.zip
|
||||
ENV ANDROID_SDK_TOOLS_FILE_NAME "commandlinetools-linux-7583922_latest.zip"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -qq -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
wget \
|
||||
bc \
|
||||
curl \
|
||||
file \
|
||||
gcc \
|
||||
git \
|
||||
g++ \
|
||||
gnupg2 \
|
||||
libc++1-10 \
|
||||
libgl1 \
|
||||
libtcmalloc-minimal4 \
|
||||
make \
|
||||
openjdk-11-jdk-headless \
|
||||
openssh-client \
|
||||
patch \
|
||||
python3 \
|
||||
python3-distutils \
|
||||
rsync \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
tzdata \
|
||||
unzip \
|
||||
sudo \
|
||||
ninja-build \
|
||||
zip \
|
||||
locales \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
&& apt-get install -qq -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
wget \
|
||||
bc \
|
||||
curl \
|
||||
file \
|
||||
gcc \
|
||||
git \
|
||||
g++ \
|
||||
gnupg2 \
|
||||
libc++1-10 \
|
||||
libgl1 \
|
||||
libtcmalloc-minimal4 \
|
||||
make \
|
||||
openjdk-11-jdk-headless \
|
||||
openssh-client \
|
||||
patch \
|
||||
python3 \
|
||||
python3-distutils \
|
||||
rsync \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
tzdata \
|
||||
unzip \
|
||||
sudo \
|
||||
ninja-build \
|
||||
zip \
|
||||
locales \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN set -o xtrace \
|
||||
&& cd /opt \
|
||||
&& sh -c 'echo "en_US.UTF-8 UTF-8" > /etc/locale.gen' \
|
||||
&& locale-gen \
|
||||
&& update-locale LANG=en_US.UTF-8 \
|
||||
&& wget -q https://dl.google.com/android/repository/${ANDROID_SDK_TOOLS_FILE_NAME} -O android-sdk-tools.zip \
|
||||
&& mkdir -p ${ANDROID_HOME}/cmdline-tools/ \
|
||||
&& unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}/cmdline-tools/ \
|
||||
&& rm android-sdk-tools.zip \
|
||||
&& mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest \
|
||||
&& chown -R root:root $ANDROID_HOME \
|
||||
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
|
||||
&& yes | sdkmanager --licenses \
|
||||
&& wget -O /usr/bin/android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/master/community-cookbooks/android-sdk/files/default/android-wait-for-emulator \
|
||||
&& chmod +x /usr/bin/android-wait-for-emulator \
|
||||
&& touch /root/.android/repositories.cfg
|
||||
&& cd /opt \
|
||||
&& sh -c 'echo "en_US.UTF-8 UTF-8" > /etc/locale.gen' \
|
||||
&& locale-gen \
|
||||
&& update-locale LANG=en_US.UTF-8 \
|
||||
&& wget -q https://dl.google.com/android/repository/${ANDROID_SDK_TOOLS_FILE_NAME} -O android-sdk-tools.zip \
|
||||
&& mkdir -p ${ANDROID_HOME}/cmdline-tools/ \
|
||||
&& unzip -q android-sdk-tools.zip -d ${ANDROID_HOME}/cmdline-tools/ \
|
||||
&& rm android-sdk-tools.zip \
|
||||
&& mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest \
|
||||
&& chown -R root:root $ANDROID_HOME \
|
||||
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
|
||||
&& yes | sdkmanager --licenses \
|
||||
&& wget -O /usr/bin/android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/master/community-cookbooks/android-sdk/files/default/android-wait-for-emulator \
|
||||
&& chmod +x /usr/bin/android-wait-for-emulator \
|
||||
&& touch /root/.android/repositories.cfg
|
||||
|
||||
ENV ANDROID_PLATFORM_VERSION 30
|
||||
ENV ANDROID_BUILD_TOOLS_VERSION 30.0.2
|
||||
ENV ANDROID_PLATFORM_VERSION 31
|
||||
ENV ANDROID_BUILD_TOOLS_VERSION 31
|
||||
|
||||
RUN yes | sdkmanager \
|
||||
"platform-tools" \
|
||||
|
@ -74,4 +73,4 @@ RUN yes | sdkmanager \
|
|||
"cmdline-tools;latest"
|
||||
|
||||
RUN mkdir -p /root/.android \
|
||||
&& touch /root/.android/repositories.cfg
|
||||
&& touch /root/.android/repositories.cfg
|
||||
|
|
Loading…
Reference in a new issue