diff --git a/Dockerfile b/Dockerfile index 3e5075d38815b93fa2f17a16114fafdca434323d..8e78df4aecb1cf443e3cce68c72fe1c597841029 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,19 @@ 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 && \ + rm /usr/lib/jdk/OpenJDK11U-jdk_x64_linux_hotspot_11.0.15_10.tar.gz