From 4eef6fc234db6f8fcbcb76ce41fc92480d6b89bf Mon Sep 17 00:00:00 2001 From: Francis De Brabandere Date: Wed, 11 Dec 2024 18:53:15 +0100 Subject: [PATCH] fix graalvm images --- graalvm-ce/Dockerfile | 5 ++--- graalvm-community/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/graalvm-ce/Dockerfile b/graalvm-ce/Dockerfile index 60a4a77..9b0f19b 100644 --- a/graalvm-ce/Dockerfile +++ b/graalvm-ce/Dockerfile @@ -35,7 +35,6 @@ RUN \ ln -s /usr/share/sbt/bin/sbt /usr/local/bin/sbt # Install Scala -## Piping curl directly in tar RUN \ case $SCALA_VERSION in \ 2.*) URL=https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz SCALA_DIR=/usr/share/scala-$SCALA_VERSION EXTRACT_DIR=/usr/share ;; \ @@ -49,8 +48,8 @@ RUN \ chmod -R 755 /usr/share/scala && \ ln -s /usr/share/scala/bin/* /usr/local/bin && \ case $SCALA_VERSION in \ - 2*) echo "println(util.Properties.versionMsg)" > /test/test.scala ;; \ - *) echo 'import java.io.FileInputStream;import java.util.jar.JarInputStream;val scala3LibJar = classOf[CanEqual[_, _]].getProtectionDomain.getCodeSource.getLocation.toURI.getPath;val manifest = new JarInputStream(new FileInputStream(scala3LibJar)).getManifest;val ver = manifest.getMainAttributes.getValue("Implementation-Version");@main def main = println(s"Scala version ${ver}")' > /test/test.scala ;; \ + 2*) echo "println(util.Properties.versionMsg)" > test.scala ;; \ + *) echo 'import java.io.FileInputStream;import java.util.jar.JarInputStream;val scala3LibJar = classOf[CanEqual[_, _]].getProtectionDomain.getCodeSource.getLocation.toURI.getPath;val manifest = new JarInputStream(new FileInputStream(scala3LibJar)).getManifest;val ver = manifest.getMainAttributes.getValue("Implementation-Version");@main def main = println(s"Scala version ${ver}")' > test.scala ;; \ esac && \ scala -nocompdaemon test.scala && rm test.scala diff --git a/graalvm-community/Dockerfile b/graalvm-community/Dockerfile index 7ef8081..04d8684 100644 --- a/graalvm-community/Dockerfile +++ b/graalvm-community/Dockerfile @@ -48,8 +48,8 @@ RUN \ chmod -R 755 /usr/share/scala && \ ln -s /usr/share/scala/bin/* /usr/local/bin && \ case $SCALA_VERSION in \ - 2*) echo "println(util.Properties.versionMsg)" > /test/test.scala ;; \ - *) echo 'import java.io.FileInputStream;import java.util.jar.JarInputStream;val scala3LibJar = classOf[CanEqual[_, _]].getProtectionDomain.getCodeSource.getLocation.toURI.getPath;val manifest = new JarInputStream(new FileInputStream(scala3LibJar)).getManifest;val ver = manifest.getMainAttributes.getValue("Implementation-Version");@main def main = println(s"Scala version ${ver}")' > /test/test.scala ;; \ + 2*) echo "println(util.Properties.versionMsg)" > /test.scala ;; \ + *) echo 'import java.io.FileInputStream;import java.util.jar.JarInputStream;val scala3LibJar = classOf[CanEqual[_, _]].getProtectionDomain.getCodeSource.getLocation.toURI.getPath;val manifest = new JarInputStream(new FileInputStream(scala3LibJar)).getManifest;val ver = manifest.getMainAttributes.getValue("Implementation-Version");@main def main = println(s"Scala version ${ver}")' > test.scala ;; \ esac && \ scala -nocompdaemon test.scala && rm test.scala