This repository was archived by the owner on May 10, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 1.21 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
FROM debian:bookworm-slim
WORKDIR /usr/local
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
git \
openjdk-17-jdk \
wget \
unzip \
zip
# Setup Android SDK environment variables
ENV ANDROID_SDK_ROOT=/usr/local/android-sdk
ENV PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/platform-tools
# Download command line tools
RUN mkdir -p $ANDROID_SDK_ROOT/cmdline-tools && \
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip && \
unzip cmdline-tools.zip -d $ANDROID_SDK_ROOT/cmdline-tools && \
mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest && \
rm cmdline-tools.zip
# Accept licenses and install platform-tools
RUN yes | sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses && \
sdkmanager --sdk_root=${ANDROID_SDK_ROOT} "platform-tools"
WORKDIR /usr/local/stario
# Clone the repo
COPY . .
RUN git fetch --all
# Setup local.properties file pointing to Android SDK
RUN echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties
# Make build scripts executable
RUN chmod +x ./build.sh && \
chmod +x ./gradlew
CMD ["/bin/bash"]