-
Notifications
You must be signed in to change notification settings - Fork 672
Expand file tree
/
Copy pathDockerfile.android-integration
More file actions
69 lines (61 loc) · 2.23 KB
/
Copy pathDockerfile.android-integration
File metadata and controls
69 lines (61 loc) · 2.23 KB
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
# Copyright (c) Tailscale Inc & AUTHORS
# SPDX-License-Identifier: BSD-3-Clause
FROM --platform=linux/amd64 eclipse-temurin:21
ENV ANDROID_HOME=/opt/android-sdk
ENV ANDROID_SDK_ROOT=/opt/android-sdk
ENV ANDROID_CMDLINE_TOOLS_VERSION=9477386
ENV KOTLIN_VERSION=1.9.22
ENV KOTLIN_HOME=/opt/kotlinc
ENV PATH=$PATH:/opt/android-sdk/cmdline-tools/latest/bin:/opt/android-sdk/platform-tools:/opt/android-sdk/emulator:/opt/kotlinc/bin
RUN apt-get update && \
apt-get -y install --no-install-recommends \
ca-certificates \
curl \
gcc \
git \
libc6-dev \
libdbus-1-3 \
libfontconfig1 \
libgl1 \
libglib2.0-0 \
libnss3 \
libpulse0 \
libstdc++6 \
libvulkan1 \
libx11-6 \
libxcb-cursor0 \
libxcb1 \
libxext6 \
libxi6 \
libxrender1 \
libxtst6 \
make \
tar \
unzip \
zip && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/android-sdk/cmdline-tools /tmp/android-sdk && \
curl -fsSL -o /tmp/android-sdk/commandlinetools.zip \
"https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_CMDLINE_TOOLS_VERSION}_latest.zip" && \
unzip -q /tmp/android-sdk/commandlinetools.zip -d /tmp/android-sdk && \
mv /tmp/android-sdk/cmdline-tools /opt/android-sdk/cmdline-tools/latest && \
rm -rf /tmp/android-sdk
RUN mkdir -p /tmp/kotlin && \
curl -fsSL -o /tmp/kotlin/kotlin-compiler.zip \
"https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_VERSION}/kotlin-compiler-${KOTLIN_VERSION}.zip" && \
unzip -q /tmp/kotlin/kotlin-compiler.zip -d /tmp/kotlin && \
mv /tmp/kotlin/kotlinc /opt/kotlinc && \
rm -rf /tmp/kotlin
RUN yes | sdkmanager --licenses >/dev/null && \
sdkmanager \
"build-tools;34.0.0" \
"emulator" \
"ndk;27.2.12479018" \
"platform-tools" \
"platforms;android-34" \
"system-images;android-33;google_apis;x86_64"
COPY scripts/run-android-integration-test-docker.sh /usr/local/bin/run-android-integration-test
RUN chmod 0755 /usr/local/bin/run-android-integration-test
WORKDIR /workspace
CMD ["/usr/local/bin/run-android-integration-test"]