Containerized isolated development environment for Scala programming language.
515
Portable containerized isolated development environment for Scala programming language projects.
docker run --name space-1 -d -p 8020-8040:8020-8040 --restart=always alnoda/scala-workspace
open localhost:8020 in browser.
To check scala version, execute in terminal
scala -version
To open scala REPL simply execute
scala
Use Code editor to create folder helloworld with file Hello.scala in it. The file should have the following content
object Hello {
def main(args: Array[String]) = {
println("Hello, world")
}
}
Open terminal, go into this folder and execute
scala Hello.scala
If you need sbt, execute
cs setup
cd to the projects directory, and create new project with Sbt
cd /home/project
sbt new scala/scala3.g8
Upon prompt type any project name, i.e. "hello-world". Sbt will generate progje boilerplate with the required folder structure.
Enter the project folder, compile and run the app
sbt run
Coursier is the Scala application and artifact manager. It can install Scala applications and setup your Scala development environment. It can also download and cache artifacts from the web.
Coursier provides a number of services:
install, list, update, uninstall, searchchannellaunch, bootstrapjava, java-homefetch, resolveList all applications, installed by Coursier
cs list
The install command installs Scala applications, i.e.
cs install scalafmt
If you want to launch another scala version
cs launch scala:2.12.15
Content type
Image
Digest
sha256:5deb59ab5…
Size
1.3 GB
Last updated
about 3 years ago
docker pull alnoda/scala-workspace