Linux Alpine docker image is based on super tiny Linux kernel BusyBox and features and package manager, apk, making easy to install build dependencies. This is particularly important for static compile languages like haskell and go as example but also for java and scala.
Scala is also a statically compiled language for the jvm and although we think of it as requiring just the jdk the typical way to build a scala application is with sbt which requires the jvm but the build also downloads a considerable number of sbt core dependencies. Hence, the safe and reliable way for reproducing build a project anywhere is to start from equal sbt installation. The best way to ensure that is to start from a pre-loaded sbt docker image.
Ideally we shouldn't deploy the build system but just the artifact in a reliable and reproducible way. Here, I'll describe two ways to do just that.