How to run
$ docker-compose build $ docker-compose run scala sbt compile $ docker-compose run scala sbt run $ docker-compose run scala sbt test $ docker-compose run scala sbt "~ test" # to run continuously $ docker-compose run scala # to access Docker's Machine $ docker-compose run scala sbt ~compile # similar to test above. Works with and without quotes
First run information
It may take a while to fetch all dependencies (libs) based on what's inside your|project
build.sbt project file.
This configuration shares a local
.ivy2 directories with Docker's Container
sbt will find your dependencies' cache and will not re-download everything again.
This Dockerfile is based on Scala-sbt Dockerfile from Docker Hub
Tips & Tricks
.ivy2 directories under your
To update Scala/SBT to latest version, remember to remove the old image. You can find it
$ docker images and remove the base image named
hseeberger/scala-sbt using command
$ docker rmi <image-hash-id>, then, build again. You can check which is the latest version here Scala-sbt Dockerfile from Docker Hub