forked from DataDog/dd-sdk-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gitlab
79 lines (63 loc) · 2.46 KB
/
Dockerfile.gitlab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:16.04
RUN apt-get update \
&& apt-get -y install openjdk-8-jdk \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
&& apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install --no-install-recommends \
curl \
git \
unzip \
wget \
openssh-client \
expect \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
ENV GRADLE_VERSION 6.8.3
ENV ANDROID_COMPILE_SDK 30
ENV ANDROID_BUILD_TOOLS 30.0.2
ENV ANDROID_SDK_TOOLS 4333796
ENV NDK_VERSION 21.3.6528147
ENV CMAKE_VERSION 3.10.2.4988404
RUN apt update && apt install -y python3
# Install pip for aws
RUN set -x \
&& curl -OL https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py \
&& rm get-pip.py
RUN python3 --version
RUN set -x \
&& pip install awscli
# Gradle
RUN \
cd /usr/local && \
curl -L https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -o gradle-${GRADLE_VERSION}-bin.zip && \
unzip gradle-${GRADLE_VERSION}-bin.zip && \
rm gradle-${GRADLE_VERSION}-bin.zip
# Workaround for
# Warning: File /root/.android/repositories.cfg could not be loaded.
RUN mkdir /root/.android \
&& touch /root/.android/repositories.cfg
# Android SDK
RUN \
wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip && \
unzip -d android-sdk-linux android-sdk.zip && \
echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null && \
echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null && \
echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null && \
echo y | android-sdk-linux/tools/bin/sdkmanager --install "ndk;${NDK_VERSION}" >/dev/null && \
echo y | android-sdk-linux/tools/bin/sdkmanager --install "cmake;${CMAKE_VERSION}" >/dev/null && \
yes | android-sdk-linux/tools/bin/sdkmanager --licenses
RUN set -x \
&& curl -OL https://s3.amazonaws.com/dd-package-public/dd-package.deb && dpkg -i dd-package.deb && rm dd-package.deb \
&& apt-get update \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
ENV ANDROID_SDK_ROOT $PWD/android-sdk-linux
ENV ANDROID_HOME $PWD/android-sdk-linux
ENV GRADLE_HOME /usr/local/gradle-${GRADLE_VERSION}
ENV ANDROID_NDK $ANDROID_SDK_ROOT/ndk/${NDK_VERSION}
ENV PATH $PATH:$GRADLE_HOME/bin
ENV PATH $PATH:$ANDROID_HOME/platform-tools
ENV PATH $PATH:$ANDROID_SDK_ROOT/build-tools/${ANDROID_BUILD_TOOLS}:$ANDROID_NDK