Skip to content

Commit

Permalink
[Scala] Use sbt official docker images (#6159)
Browse files Browse the repository at this point in the history
* use official sbt images

* typo

* try scala 3

* use scala 2.x when 3.x is not available

* typo

* typo

* use the same java platform for build and run

* upgrade wait time

* Revert "upgrade wait time"

This reverts commit 9deacf2.

* dowgrade to java 11
  • Loading branch information
waghanza authored Mar 24, 2023
1 parent 6a6335c commit edef6d5
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 5 deletions.
10 changes: 8 additions & 2 deletions scala/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
FROM hseeberger/scala-sbt:11.0.13_1.6.1_2.13.8 AS build
{{#provider.default.image-version}}
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-11.0.17_8_1.8.2_{{#provider.default.image-version}}{{{.}}}{{/provider.default.image-version}} AS build
{{/provider.default.image-version}}
{{^provider.default.image-version}}
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-11.0.17_8_1.8.2_3.2.2 AS build
{{/provider.default.image-version}}


WORKDIR /usr/src/app

COPY . ./

RUN sbt universal:packageZipTarball

FROM openjdk:11.0.16-jre
FROM eclipse-temurin:11-jre-jammy

WORKDIR /usr/src/app

Expand Down
2 changes: 1 addition & 1 deletion scala/akkahttp/build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name := "server"
scalaVersion := "2.13.10"
scalaVersion := "3.2.2"

libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % "[10.5,10.6)",
Expand Down
6 changes: 6 additions & 0 deletions scala/finatra/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
provider:
default:
language: 2.13

image-version: 2.13.10

framework:
website: twitter.github.io/finatra/
version: 22.12
2 changes: 1 addition & 1 deletion scala/finch/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ lazy val root = (project in file("."))
libraryDependencies ++= Seq(
"com.github.finagle" %% "finch-core" % FinagleVersionRange
)
).enablePlugins(JavaAppPackaging)
).enablePlugins(JavaAppPackaging)
6 changes: 6 additions & 0 deletions scala/finch/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
provider:
default:
language: 2.13

image-version: 2.13.10

framework:
website: finagle.github.io/finch/
version: 0.34
2 changes: 1 addition & 1 deletion scala/http4s/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
val Http4sVersionRange = "[0.23,0.24)"

name := "server"
scalaVersion := "2.13.10"
scalaVersion := "3.2.2"

lazy val root = (project in file("."))
.settings(
Expand Down
6 changes: 6 additions & 0 deletions scala/play/config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
provider:
default:
language: 2.13

image-version: 2.13.10

framework:
website: playframework.com
version: 2.8

0 comments on commit edef6d5

Please sign in to comment.