Docker image for Scala and SBT with different version.
3.5K
2.12.4-sbt-1.0.4, Dockerfile
2.12.3-sbt-1.0.0, Dockerfile
2.12.2-sbt-1.0.0.rc2, Dockerfile
2.12.2-sbt-0.13.15, Dockerfile
2.12.0-sbt-0.13.13, Dockerfile
2.11.8-sbt-0.13.11, Dockerfile
your-scala-project
│ build.sbt
│ Dockerfile
│
├───project
| build.properties
| plugins.sbt
|
└───src
├───main
│ │ ...
│
└───test
Dockerfile should be like:FROM ysihaoy/scala:2.12.4-sbt-1.0.4
# caching dependencies
COPY ["build.sbt", "/tmp/build/"]
COPY ["project/plugins.sbt", "project/build.properties", "/tmp/build/project/"]
RUN cd /tmp/build && \
sbt compile && \
sbt test:compile && \
rm -rf /tmp/build
# copy source code
COPY . /root/app/
WORKDIR /root/app
RUN sbt compile && sbt test:compile
CMD ["sbt"]
In order to have fast CI (continuous integration) build process, sample of your project/build.properties and build.sbt should be like:
project/build.propertiessbt.version = 1.0.4
build.sbtscalaVersion := "2.12.4"
Content type
Image
Digest
Size
202.2 MB
Last updated
almost 9 years ago
docker pull ysihaoy/scala