From 5896237b566b8bc3271fb786b17164b3be9d4c8b Mon Sep 17 00:00:00 2001 From: Jing Li Date: Sat, 20 Jan 2024 22:20:57 +0100 Subject: [PATCH] Revert "Make JAVA_HOME platform independent" This reverts commit 613e72fe5eef931087aee4551cd16d6805acde9e. --- android-sdk/Dockerfile | 7 +------ android-sdk/entrypoint.sh | 7 ------- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100755 android-sdk/entrypoint.sh diff --git a/android-sdk/Dockerfile b/android-sdk/Dockerfile index 9653725..fdab7c3 100644 --- a/android-sdk/Dockerfile +++ b/android-sdk/Dockerfile @@ -51,8 +51,7 @@ RUN mkdir -p ${ANDROID_HOME}/cmdline-tools && \ rm *tools*linux*.zip # set the environment variables -RUN JAVA_HOME=$(ls -d /usr/lib/jvm/java-${JDK_VERSION}-openjdk-* | head -n 1) && \ - echo "export JAVA_HOME=$JAVA_HOME" > /tmp/java_home.sh +ENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk-amd64 ENV GRADLE_HOME /opt/gradle ENV KOTLIN_HOME /opt/kotlinc ENV PATH ${PATH}:${GRADLE_HOME}/bin:${KOTLIN_HOME}/bin:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/cmdline-tools/tools/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/emulator @@ -94,9 +93,5 @@ RUN apt-get update && \ done && \ (rm /tmp/*.pub 2> /dev/null || true) -ADD entrypoint.sh /tmp/entrypoint.sh -RUN chmod +x /tmp/entrypoint.sh -ENTRYPOINT ["/tmp/entrypoint.sh"] - ADD supervisord.conf /etc/supervisor/conf.d/ CMD ["/usr/bin/supervisord"] diff --git a/android-sdk/entrypoint.sh b/android-sdk/entrypoint.sh deleted file mode 100755 index 6c848aa..0000000 --- a/android-sdk/entrypoint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -if [ -f /tmp/java_home.sh ]; then - source /tmp/java_home.sh -fi - -exec "$@" \ No newline at end of file