Sign inSign up

alekslitvinenk/sbt

By alekslitvinenk

Updated about 6 years ago

Image
0

2.5K

alekslitvinenk/sbt repository overview

docker-sbt

Dockerized SBT for building Scala and Java projects

Usage

Bind-monting project-directory to alekslitvinenk/sbt
 docker run -v <path to your scala project on host machine>:/scala-project alekslitvinenk/sbt

Optionally, you can bind-mount output directory if you want the artifact to be saved on directory other than /target

-v <path where you want to output build artefacts on host machine>:/target
Deriving from alekslitvinenk/sbt
  1. In the root folder of your Scala project create Dockerfile file the similar content:

    FROM alekslitvinenk/sbt:latest
    COPY . .
    
  2. Build image:

    docker build -t <your image derived from alekslitvinenk/sbt>
    
  3. Run sbt container:

    docker run -v <host output directory>:/target <your image derived from alekslitvinenk/sbt> sbt compile
    

    Example:

    docker run -v ~/dist:/target alekslitvinenk/dockovpn-it sbt compile
    

Tag summary

Content type

Image

Digest

Size

56.6 MB

Last updated

about 6 years ago

docker pull alekslitvinenk/sbt