From c298f44dd9e6024fff0a0ac2888ecacaa07c0e4c Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 28 Sep 2022 13:14:29 +0000 Subject: [PATCH 1/3] Install jdk-11.0.15 --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e5075d3..a43ef92f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,20 @@ ENV SNAP="/snap/snapcraft/current" ENV SNAP_NAME="snapcraft" ENV SNAP_ARCH="amd64" -RUN apt-get install -y openjdk-11-jdk nsis rsync \ No newline at end of file +RUN apt-get install -y nsis rsync wget + +RUN mkdir /usr/lib/jdk && \ + cd /usr/lib/jdk && \ + wget https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz && \ + tar -xvf OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz + +RUN echo 'PATH="${PATH}:/usr/lib/jdk/jdk-11.0.15+10/bin"' >> /etc/environment && \ + echo 'JAVA_HOME="/usr/lib/jdk/jdk-11.0.15+10"' >> /etc/environment && \ + update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jdk/jdk-11.0.15+10/bin/java" 0 && \ + update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jdk/jdk-11.0.15+10/bin/javac" 0 && \ + update-alternatives --set java /usr/lib/jdk/jdk-11.0.15+10/bin/java && \ + update-alternatives --set javac /usr/lib/jdk/jdk-11.0.15+10/bin/javac && \ + update-alternatives --list java && \ + update-alternatives --list javac && \ + java --version && \ + rm OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz -- GitLab From 607cdbdb1791fd15a97926ad028844caeea816a2 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 28 Sep 2022 13:43:43 +0000 Subject: [PATCH 2/3] test --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a43ef92f..bf578330 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,5 +34,5 @@ RUN echo 'PATH="${PATH}:/usr/lib/jdk/jdk-11.0.15+10/bin"' >> /etc/environment && update-alternatives --set javac /usr/lib/jdk/jdk-11.0.15+10/bin/javac && \ update-alternatives --list java && \ update-alternatives --list javac && \ - java --version && \ + java --version && pwd && ls && \ rm OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz -- GitLab From 09520ce228dafb940ce3b8d0002aa831c8227343 Mon Sep 17 00:00:00 2001 From: Romain Hunault Date: Wed, 28 Sep 2022 13:48:21 +0000 Subject: [PATCH 3/3] Update rm path --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf578330..8e78df4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,5 +34,4 @@ RUN echo 'PATH="${PATH}:/usr/lib/jdk/jdk-11.0.15+10/bin"' >> /etc/environment && update-alternatives --set javac /usr/lib/jdk/jdk-11.0.15+10/bin/javac && \ update-alternatives --list java && \ update-alternatives --list javac && \ - java --version && pwd && ls && \ - rm OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz + rm /usr/lib/jdk/OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz -- GitLab