This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.gitlab
98 lines (78 loc) · 3.42 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
FROM registry.ddbuild.io/images/mirror/ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
# Set timezone to UTC by default
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN apt-get update \
&& apt-get -y install openjdk-11-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 \
python3-distutils \
python3-apt \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*
ENV GRADLE_VERSION 7.2
ENV ANDROID_COMPILE_SDK 31
ENV ANDROID_BUILD_TOOLS 31.0.0
ENV ANDROID_SDK_TOOLS 7583922
ENV NDK_VERSION 21.4.7075529
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/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip && \
mkdir -p android-sdk-linux/cmdline-tools && \
unzip -d android-sdk-linux/cmdline-tools android-sdk.zip && \
mv android-sdk-linux/cmdline-tools/cmdline-tools android-sdk-linux/cmdline-tools/latest && \
echo y | android-sdk-linux/cmdline-tools/latest/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null && \
echo y | android-sdk-linux/cmdline-tools/latest/bin/sdkmanager "platform-tools" >/dev/null && \
echo y | android-sdk-linux/cmdline-tools/latest/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null && \
echo y | android-sdk-linux/cmdline-tools/latest/bin/sdkmanager --install "ndk;${NDK_VERSION}" >/dev/null && \
echo y | android-sdk-linux/cmdline-tools/latest/bin/sdkmanager --install "cmake;${CMAKE_VERSION}" >/dev/null && \
yes | android-sdk-linux/cmdline-tools/latest/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
# Woke
ENV WOKE_VERSION "0.6.0"
ENV WOKE_SHA256 "ea5605d4242b93d9586a21878264dd8abcf64ed92f0f6538ea831d9d3215b883"
RUN curl -L https://github.com/get-woke/woke/releases/download/v${WOKE_VERSION}/woke-${WOKE_VERSION}-linux-amd64.tar.gz -o woke-linux-amd64.tar.gz \
&& echo "${WOKE_SHA256} woke-linux-amd64.tar.gz" | sha256sum -c \
&& tar -xf woke-linux-amd64.tar.gz \
&& mv woke-${WOKE_VERSION}-linux-amd64/woke /usr/bin/woke \
&& rm -Rf woke-${WOKE_VERSION}-linux-amd64 woke-${WOKE_VERSION}-linux-amd64.tar.gz