diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a203efd..6ab7f00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,19 +16,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - scalaVersion: ['2.12.19', '2.13.14', '3.3.3', '3.4.2'] + scalaVersion: ['2.12.20', '2.13.15', '3.3.4', '3.5.2'] javaTag: [ 'graalvm-community-22.0.1', 'graalvm-community-21.0.2', 'graalvm-ce-22.3.3-b1-java17', - 'eclipse-temurin-jammy-22_36', - 'eclipse-temurin-jammy-21.0.2_13', - 'eclipse-temurin-jammy-17.0.10_7', - 'eclipse-temurin-alpine-22_36', - 'eclipse-temurin-alpine-21.0.2_13', - 'eclipse-temurin-alpine-17.0.10_7', - 'amazoncorretto-21.0.3', - 'amazoncorretto-17.0.11' + 'eclipse-temurin-23.0.1_11', + 'eclipse-temurin-21.0.5_11', + 'eclipse-temurin-17.0.13_11', + 'eclipse-temurin-alpine-23.0.1_11', + 'eclipse-temurin-alpine-21.0.5_11', + 'eclipse-temurin-alpine-17.0.13_11', + 'amazoncorretto-21.0.5', + 'amazoncorretto-17.0.13' ] include: # https://github.com/graalvm/container/pkgs/container/graalvm-community @@ -46,50 +46,65 @@ jobs: baseImageTag: 'ol9-java17-22.3.3-b1' platforms: 'linux/amd64,linux/arm64' # https://hub.docker.com/_/eclipse-temurin/tags - - javaTag: 'eclipse-temurin-jammy-22_36' + - javaTag: 'eclipse-temurin-23.0.1_11' dockerContext: 'eclipse-temurin' - baseImageTag: '22_36-jdk-jammy' + baseImageTag: '23.0.1_11-jdk' platforms: 'linux/amd64,linux/arm64' - - javaTag: 'eclipse-temurin-jammy-21.0.2_13' + - javaTag: 'eclipse-temurin-21.0.5_11' dockerContext: 'eclipse-temurin' - baseImageTag: '21.0.2_13-jdk-jammy' + baseImageTag: '21.0.5_11-jdk' platforms: 'linux/amd64,linux/arm64' - - javaTag: 'eclipse-temurin-jammy-17.0.10_7' + - javaTag: 'eclipse-temurin-17.0.13_11' dockerContext: 'eclipse-temurin' - baseImageTag: '17.0.10_7-jdk-jammy' + baseImageTag: '17.0.13_11-jdk' platforms: 'linux/amd64,linux/arm64' # https://hub.docker.com/_/eclipse-temurin/tags?page=1&name=alpine - - javaTag: 'eclipse-temurin-alpine-22_36' + - javaTag: 'eclipse-temurin-alpine-23.0.1_11' dockerContext: 'eclipse-temurin' dockerfile: 'alpine.Dockerfile' - baseImageTag: '22_36-jdk-alpine' + baseImageTag: '23.0.1_11-jdk-alpine' platforms: 'linux/amd64,linux/arm64/v8' - - javaTag: 'eclipse-temurin-alpine-21.0.2_13' + - javaTag: 'eclipse-temurin-alpine-21.0.5_11' dockerContext: 'eclipse-temurin' dockerfile: 'alpine.Dockerfile' baseImageTag: '21.0.2_13-jdk-alpine' platforms: 'linux/amd64,linux/arm64/v8' - - javaTag: 'eclipse-temurin-alpine-17.0.10_7' + - javaTag: 'eclipse-temurin-alpine-17.0.13_11' dockerContext: 'eclipse-temurin' dockerfile: 'alpine.Dockerfile' - baseImageTag: '17.0.10_7-jdk-alpine' + baseImageTag: '17.0.13_11-jdk-alpine' platforms: 'linux/amd64' # https://hub.docker.com/_/amazoncorretto/tags - - javaTag: 'amazoncorretto-21.0.3' + - javaTag: 'amazoncorretto-21.0.5' dockerContext: 'amazoncorretto' - baseImageTag: '21.0.3' + baseImageTag: '21.0.5' platforms: 'linux/amd64' - - javaTag: 'amazoncorretto-17.0.11' + - javaTag: 'amazoncorretto-17.0.13' dockerContext: 'amazoncorretto' - baseImageTag: '17.0.11' + baseImageTag: '17.0.13' platforms: 'linux/amd64' + exclude: + # https://github.com/VirtusLab/scala-cli/issues/3130 + - scalaVersion: '3.5.2' + javaTag: 'graalvm-community-22.0.1' + - scalaVersion: '3.5.2' + javaTag: 'graalvm-community-21.0.2' + - scalaVersion: '3.5.2' + javaTag: 'graalvm-ce-22.3.3-b1-java17' + # https://github.com/VirtusLab/scala-cli/issues/2758 + # - scalaVersion: '3.5.0' + # javaTag: 'eclipse-temurin-alpine-22_36' + # - scalaVersion: '3.5.0' + # javaTag: 'eclipse-temurin-alpine-21.0.2_13' + # - scalaVersion: '3.5.0' + # javaTag: 'eclipse-temurin-alpine-17.0.10_7' steps: - uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 + uses: docker/setup-qemu-action@v3.2.0 - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v3.3.0 + uses: docker/setup-buildx-action@v3.7.1 # with: # install: true - name: Available platforms diff --git a/amazoncorretto/Dockerfile b/amazoncorretto/Dockerfile index 696475c..ec77baa 100644 --- a/amazoncorretto/Dockerfile +++ b/amazoncorretto/Dockerfile @@ -6,17 +6,17 @@ # Pull base image ARG BASE_IMAGE_TAG -FROM amazoncorretto:${BASE_IMAGE_TAG:-17.0.6} +FROM amazoncorretto:${BASE_IMAGE_TAG:-21.0.5} # Env variables ARG SCALA_VERSION -ENV SCALA_VERSION ${SCALA_VERSION:-2.13.10} +ENV SCALA_VERSION=${SCALA_VERSION:-3.3.4} ARG SBT_VERSION -ENV SBT_VERSION ${SBT_VERSION:-1.8.2} +ENV SBT_VERSION=${SBT_VERSION:-1.10.5} ARG USER_ID -ENV USER_ID ${USER_ID:-1001} +ENV USER_ID=${USER_ID:-1001} ARG GROUP_ID -ENV GROUP_ID ${GROUP_ID:-1001} +ENV GROUP_ID=${GROUP_ID:-1001} # Install git and rpm for sbt-native-packager (see https://github.com/sbt/docker-sbt/pull/114) RUN yum -y update && \ @@ -26,7 +26,7 @@ RUN yum -y update && \ # Install sbt RUN \ - curl -fsL "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ + curl -fsL --show-error "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ chown -R root:root /usr/share/sbt && \ chmod -R 755 /usr/share/sbt && \ ln -s /usr/share/sbt/bin/sbt /usr/local/bin/sbt @@ -37,22 +37,19 @@ RUN \ "3"*) URL=https://github.com/lampepfl/dotty/releases/download/$SCALA_VERSION/scala3-$SCALA_VERSION.tar.gz SCALA_DIR=/usr/share/scala3-$SCALA_VERSION ;; \ *) URL=https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz SCALA_DIR=/usr/share/scala-$SCALA_VERSION ;; \ esac && \ - curl -fsL $URL | tar xfz - -C /usr/share && \ + curl -fsL --show-error $URL | tar xfz - -C /usr/share && \ mv $SCALA_DIR /usr/share/scala && \ chown -R root:root /usr/share/scala && \ chmod -R 755 /usr/share/scala && \ ln -s /usr/share/scala/bin/* /usr/local/bin && \ + mkdir -p /test && \ case $SCALA_VERSION in \ - "3"*) \ - echo '@main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")' > test.scala && \ - # WORKAROUND: tput: terminal attributes: No such device or address - mv /usr/bin/tput /usr/bin/_tput && \ - scala test.scala && rm test.scala && \ - mv /usr/bin/_tput /usr/bin/tput ;; \ - *) \ - echo "println(util.Properties.versionMsg)" > test.scala && \ - scala -nocompdaemon test.scala && rm test.scala ;; \ - esac + "3"*) 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 ;; \ + *) echo "println(util.Properties.versionMsg)" > /test/test.scala ;; \ + esac && \ + scala -nocompdaemon test.scala && rm test.scala + scala -nocompdaemon test/test.scala && \ + rm -fr test # Symlink java to have it available on sbtuser's PATH RUN ln -s /opt/java/openjdk/bin/java /usr/local/bin/java @@ -89,4 +86,4 @@ RUN \ ## -w /home/sbtuser WORKDIR /root -CMD sbt +CMD ["sbt"] diff --git a/eclipse-temurin/Dockerfile b/eclipse-temurin/Dockerfile index db5aef9..5b98f71 100644 --- a/eclipse-temurin/Dockerfile +++ b/eclipse-temurin/Dockerfile @@ -10,13 +10,13 @@ FROM eclipse-temurin:${BASE_IMAGE_TAG:-11.0.16.1_1-jdk} # Env variables ARG SCALA_VERSION -ENV SCALA_VERSION ${SCALA_VERSION:-2.13.10} +ENV SCALA_VERSION=${SCALA_VERSION:-2.13.10} ARG SBT_VERSION -ENV SBT_VERSION ${SBT_VERSION:-1.6.2} +ENV SBT_VERSION=${SBT_VERSION:-1.6.2} ARG USER_ID -ENV USER_ID ${USER_ID:-1001} +ENV USER_ID=${USER_ID:-1001} ARG GROUP_ID -ENV GROUP_ID ${GROUP_ID:-1001} +ENV GROUP_ID=${GROUP_ID:-1001} # Install dependencies # curl for downloading sbt and scala @@ -28,7 +28,7 @@ RUN \ # Install sbt RUN \ - curl -fsL "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ + curl -fsL --show-error "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ chown -R root:root /usr/share/sbt && \ chmod -R 755 /usr/share/sbt && \ ln -s /usr/share/sbt/bin/sbt /usr/local/bin/sbt @@ -39,16 +39,18 @@ RUN \ "3"*) URL=https://github.com/lampepfl/dotty/releases/download/$SCALA_VERSION/scala3-$SCALA_VERSION.tar.gz SCALA_DIR=/usr/share/scala3-$SCALA_VERSION ;; \ *) URL=https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz SCALA_DIR=/usr/share/scala-$SCALA_VERSION ;; \ esac && \ - curl -fsL $URL | tar xfz - -C /usr/share && \ + curl -fsL --show-error $URL | tar xfz - -C /usr/share && \ mv $SCALA_DIR /usr/share/scala && \ chown -R root:root /usr/share/scala && \ chmod -R 755 /usr/share/scala && \ ln -s /usr/share/scala/bin/* /usr/local/bin && \ + mkdir -p /test && \ case $SCALA_VERSION in \ - "3"*) echo '@main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")' > test.scala ;; \ - *) echo "println(util.Properties.versionMsg)" > test.scala ;; \ + "3"*) 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 ;; \ + *) echo "println(util.Properties.versionMsg)" > /test/test.scala ;; \ esac && \ - scala -nocompdaemon test.scala && rm test.scala + scala -nocompdaemon test/test.scala && \ + rm -fr test # Symlink java to have it available on sbtuser's PATH RUN ln -s /opt/java/openjdk/bin/java /usr/local/bin/java @@ -86,4 +88,4 @@ RUN \ ## -w /home/sbtuser WORKDIR /root -CMD sbt +CMD ["sbt"] diff --git a/eclipse-temurin/alpine.Dockerfile b/eclipse-temurin/alpine.Dockerfile index 7990c78..a036be3 100644 --- a/eclipse-temurin/alpine.Dockerfile +++ b/eclipse-temurin/alpine.Dockerfile @@ -1,6 +1,6 @@ # Use a multi-stage build to reduce the size of the final image ARG BASE_IMAGE_TAG -FROM eclipse-temurin:${BASE_IMAGE_TAG:-21.0.2_13-jdk-alpine} as builder +FROM eclipse-temurin:${BASE_IMAGE_TAG:-21.0.2_13-jdk-alpine} AS builder ARG SCALA_VERSION=3.4.0 ARG SBT_VERSION=1.9.9 @@ -18,20 +18,20 @@ RUN \ "3"*) URL=https://github.com/lampepfl/dotty/releases/download/$SCALA_VERSION/scala3-$SCALA_VERSION.tar.gz SCALA_DIR=scala3-$SCALA_VERSION ;; \ *) URL=https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz SCALA_DIR=scala-$SCALA_VERSION ;; \ esac && \ - curl -fsL $URL | tar xfz - -C /usr/share && \ + curl -fsL --show-error $URL | tar xfz - -C /usr/share && \ mv /usr/share/$SCALA_DIR $SCALA_HOME && \ ln -s "$SCALA_HOME/bin/"* "/usr/bin/" && \ update-ca-certificates && \ scala -version && \ case $SCALA_VERSION in \ - "3"*) echo '@main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")' > test.scala ;; \ - *) echo "println(util.Properties.versionMsg)" > test.scala ;; \ + "3"*) 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 ;; \ + *) echo "println(util.Properties.versionMsg)" > test.scala ;; \ esac && \ scala -nocompdaemon test.scala && rm test.scala # Install sbt RUN \ - curl -fsL https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz | tar xfz - -C /usr/local && \ + curl -fsL --show-error https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz | tar xfz - -C /usr/local && \ $(mv /usr/local/sbt-launcher-packaging-$SBT_VERSION /usr/local/sbt || true) && \ ln -s /usr/local/sbt/bin/* /usr/local/bin/ && \ sbt -Dsbt.rootdir=true -batch sbtVersion && \ @@ -88,4 +88,4 @@ RUN \ ## -w /home/sbtuser WORKDIR /root -CMD sbt +CMD ["sbt"] diff --git a/graalvm-ce/Dockerfile b/graalvm-ce/Dockerfile index 20015d5..cfc4157 100644 --- a/graalvm-ce/Dockerfile +++ b/graalvm-ce/Dockerfile @@ -10,18 +10,18 @@ FROM ghcr.io/graalvm/graalvm-ce:${BASE_IMAGE_TAG:-java11-21.3.0} # Env variables ARG SCALA_VERSION -ENV SCALA_VERSION ${SCALA_VERSION:-2.13.10} +ENV SCALA_VERSION=${SCALA_VERSION:-2.13.10} ARG SBT_VERSION -ENV SBT_VERSION ${SBT_VERSION:-1.6.2} -ENV JAVA_OPTS -XX:+UseG1GC +ENV SBT_VERSION=${SBT_VERSION:-1.6.2} +ENV JAVA_OPTS=-XX:+UseG1GC ARG USER_ID -ENV USER_ID ${USER_ID:-1001} +ENV USER_ID=${USER_ID:-1001} ARG GROUP_ID -ENV GROUP_ID ${GROUP_ID:-1001} +ENV GROUP_ID=${GROUP_ID:-1001} # Install sbt RUN \ - curl -fsL "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ + curl -fsL --show-error "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ chown -R root:root /usr/share/sbt && \ chmod -R 755 /usr/share/sbt && \ ln -s /usr/share/sbt/bin/sbt /usr/local/bin/sbt @@ -33,13 +33,13 @@ RUN \ "3"*) URL=https://github.com/lampepfl/dotty/releases/download/$SCALA_VERSION/scala3-$SCALA_VERSION.tar.gz SCALA_DIR=/usr/share/scala3-$SCALA_VERSION ;; \ *) URL=https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz SCALA_DIR=/usr/share/scala-$SCALA_VERSION ;; \ esac && \ - curl -fsL $URL | tar xfz - -C /usr/share && \ + curl -fsL --show-error $URL | tar xfz - -C /usr/share && \ mv $SCALA_DIR /usr/share/scala && \ chown -R root:root /usr/share/scala && \ chmod -R 755 /usr/share/scala && \ ln -s /usr/share/scala/bin/* /usr/local/bin && \ case $SCALA_VERSION in \ - "3"*) echo '@main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")' > test.scala ;; \ + "3"*) 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 ;; \ *) echo "println(util.Properties.versionMsg)" > test.scala ;; \ esac && \ scala -nocompdaemon test.scala && rm test.scala @@ -77,4 +77,4 @@ RUN \ ## -w /home/sbtuser WORKDIR /root -CMD sbt +CMD ["sbt"] diff --git a/graalvm-community/Dockerfile b/graalvm-community/Dockerfile index 6cf27df..8cc81ea 100644 --- a/graalvm-community/Dockerfile +++ b/graalvm-community/Dockerfile @@ -10,18 +10,18 @@ FROM ghcr.io/graalvm/graalvm-community:${BASE_IMAGE_TAG:-21.0.1-ol9} # Env variables ARG SCALA_VERSION -ENV SCALA_VERSION ${SCALA_VERSION:-2.13.12} +ENV SCALA_VERSION=${SCALA_VERSION:-2.13.12} ARG SBT_VERSION -ENV SBT_VERSION ${SBT_VERSION:-1.9.7} -ENV JAVA_OPTS -XX:+UseG1GC +ENV SBT_VERSION=${SBT_VERSION:-1.9.7} +ENV JAVA_OPTS=-XX:+UseG1GC ARG USER_ID -ENV USER_ID ${USER_ID:-1001} +ENV USER_ID=${USER_ID:-1001} ARG GROUP_ID -ENV GROUP_ID ${GROUP_ID:-1001} +ENV GROUP_ID=${GROUP_ID:-1001} # Install sbt RUN \ - curl -fsL "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ + curl -fsL --show-error "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xfz - -C /usr/share && \ chown -R root:root /usr/share/sbt && \ chmod -R 755 /usr/share/sbt && \ ln -s /usr/share/sbt/bin/sbt /usr/local/bin/sbt @@ -33,13 +33,13 @@ RUN \ "3"*) URL=https://github.com/lampepfl/dotty/releases/download/$SCALA_VERSION/scala3-$SCALA_VERSION.tar.gz SCALA_DIR=/usr/share/scala3-$SCALA_VERSION ;; \ *) URL=https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz SCALA_DIR=/usr/share/scala-$SCALA_VERSION ;; \ esac && \ - curl -fsL $URL | tar xfz - -C /usr/share && \ + curl -fsL --show-error $URL | tar xfz - -C /usr/share && \ mv $SCALA_DIR /usr/share/scala && \ chown -R root:root /usr/share/scala && \ chmod -R 755 /usr/share/scala && \ ln -s /usr/share/scala/bin/* /usr/local/bin && \ case $SCALA_VERSION in \ - "3"*) echo '@main def main = println(s"Scala library version ${dotty.tools.dotc.config.Properties.versionNumberString}")' > test.scala ;; \ + "3"*) 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 ;; \ *) echo "println(util.Properties.versionMsg)" > test.scala ;; \ esac && \ scala -nocompdaemon test.scala && rm test.scala @@ -77,4 +77,4 @@ RUN \ ## -w /home/sbtuser WORKDIR /root -CMD sbt +CMD ["sbt"]