This repository contains a Dockerfile for Docker, Scala and sbt.
AWS CodeBuild Ubuntu Java OpenJDK 8, but since those docker images do not seem to be publicly available, that Dockerfile has been used as the base for this Dockerfile and has been extended to install Scala and Sbt.
Difference with other scala-sbt images, like hseeberger/scala-sbt, is that this image also contains the 'docker' tools so a docker command can natively be executed to build a docker image of the project.
- Install Docker
- Pull automated build from public Docker Hub Registry:
docker pull diversit/aws-codebuild-scala-sbt
Alternatively, you can build an image from Dockerfile:
docker build -t diversit/aws-codebuild-scala-sbt github.com/diversit/aws-codebuild-scala-sbt
docker run -it --rm diversit/aws-codebuild-scala-sbt:latest
Or, to reuse your local repository caches.
This also maps your current folder to the /root/repo
volume in the Docker container so you can build your Scala project right away.
docker run -it --rm -v `pwd`:/root/repo \
-v ~/.sbt:/root/.sbt \
-v ~/.m2:/root/.m2:rw \
-v ~/.ivy2:/root/.ivy2:rw \
-v ~/.coursier:/root/.coursier:rw \
-w /root/repo \
diversit/aws-codebuild-scala-sbt:latest
To build the project directly:
docker run -it --rm -v `pwd`:/root/repo \
-v ~/.m2:/root/.m2:rw \
-v ~/.ivy2:/root/.ivy2:rw \
-v ~/.coursier:/root/.coursier:rw \
-w /root/repo \
diversit/aws-codebuild-scala-sbt:latest sbt clean test package
Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.
This code is open source software licensed under the Apache 2.0 License.