Skip to content

Commit

Permalink
manually install open jdk 21
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky committed Nov 8, 2024
1 parent d122364 commit db02541
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM debian:bookworm

RUN apt-get update && apt-get install -y apt-utils software-properties-common
RUN apt-get install -y ruby wget libxdamage1 libgl1-mesa-glx libpulse0 locales unzip openjdk-21-jdk curl qrencode git && \
RUN apt-get install -y ruby wget libxdamage1 libgl1-mesa-glx libpulse0 locales unzip curl qrencode git && \
apt-get autoremove -y && apt-get autoclean && apt-get clean && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*

RUN cd /tmp/ && wget https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz && \
tar xf openjdk-21.0.2_linux-x64_bin.tar.gz && mv jdk-21.0.2 /usr/local/jdk-21 && rm openjdk-21.0.2_linux-x64_bin.tar.gz

RUN mkdir /opt/android-sdk-linux && \
cd /opt/android-sdk-linux && \
wget --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip && \
Expand All @@ -17,7 +20,8 @@ RUN mkdir /opt/android-sdk-linux && \
ENV SHELL /bin/bash
ENV ANDROID_HOME=/opt/android-sdk-linux/
ENV ANDROID_SDK_ROOT=/opt/android-sdk-linux/
ENV PATH=$PATH:/opt/android-sdk-linux/cmdline-tools/latest/bin/:/opt/android-sdk-linux/emulator/:/opt/android-sdk-linux/platform-tools/
ENV PATH=$PATH:/opt/android-sdk-linux/cmdline-tools/latest/bin/:/opt/android-sdk-linux/emulator/:/opt/android-sdk-linux/platform-tools/:/usr/local/jdk-21/bin
ENV JAVA_HOME=/usr/local/jdk-21

RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
RUN locale-gen && update-locale LANG=en_US.UTF-8
Expand Down

0 comments on commit db02541

Please sign in to comment.