-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 879 Bytes
/
Dockerfile
File metadata and controls
30 lines (23 loc) · 879 Bytes
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
FROM ubuntu:24.04
# Dependencies
RUN apt-get update && apt-get install -y \
openjdk-17-jdk zip unzip wget
# Setup env
ENV ANDROID_HOME=/home/ubuntu/Android
ENV PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH
ENV PATH=$ANDROID_HOME/platform-tools:$PATH
# Use bash so we can use su -c with login shell behavior
SHELL ["/bin/bash", "-c"]
# Android SDK and gradle
RUN su - ubuntu -c "\
mkdir -p $ANDROID_HOME/cmdline-tools && \
cd $ANDROID_HOME && \
wget https://dl.google.com/android/repository/commandlinetools-linux-14742923_latest.zip && \
unzip commandlinetools-linux-14742923_latest.zip -d cmdline-tools && \
mv cmdline-tools/cmdline-tools cmdline-tools/latest && \
rm commandlinetools-linux-14742923_latest.zip && \
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses \
"
RUN su - ubuntu -c "mkdir ~/.gradle"
# Workdir
WORKDIR /musekit