Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/add-amazon-…
Browse files Browse the repository at this point in the history
…corretto

# Conflicts:
#	.github/workflows/build.yml
  • Loading branch information
kijuky committed Nov 14, 2024
2 parents 5132808 + b28c743 commit da80174
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 78 deletions.
67 changes: 41 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
33 changes: 15 additions & 18 deletions amazoncorretto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -89,4 +86,4 @@ RUN \
## -w /home/sbtuser
WORKDIR /root

CMD sbt
CMD ["sbt"]
22 changes: 12 additions & 10 deletions eclipse-temurin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -86,4 +88,4 @@ RUN \
## -w /home/sbtuser
WORKDIR /root

CMD sbt
CMD ["sbt"]
12 changes: 6 additions & 6 deletions eclipse-temurin/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 && \
Expand Down Expand Up @@ -88,4 +88,4 @@ RUN \
## -w /home/sbtuser
WORKDIR /root

CMD sbt
CMD ["sbt"]
18 changes: 9 additions & 9 deletions graalvm-ce/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -77,4 +77,4 @@ RUN \
## -w /home/sbtuser
WORKDIR /root

CMD sbt
CMD ["sbt"]
18 changes: 9 additions & 9 deletions graalvm-community/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -77,4 +77,4 @@ RUN \
## -w /home/sbtuser
WORKDIR /root

CMD sbt
CMD ["sbt"]

0 comments on commit da80174

Please sign in to comment.