Last active
March 26, 2017 13:40
-
-
Save getmetorajesh/2aee4c69a1fe9ac52705ad5c609e1c50 to your computer and use it in GitHub Desktop.
Dockerfile for scala and sbt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:8 | |
ENV SCALA_VERSION 2.12.1 | |
ENV SBT_VERSION 0.13.13 | |
# Scala expects this file | |
RUN touch /usr/lib/jvm/java-8-openjdk-amd64/release | |
# Install Scala | |
## Piping curl directly in tar | |
RUN \ | |
curl -fsL http://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz | tar xfz - -C /root/ && \ | |
echo >> /root/.bashrc && \ | |
echo 'export PATH=~/scala-$SCALA_VERSION/bin:$PATH' >> /root/.bashrc | |
# Install sbt | |
RUN \ | |
curl -L -o sbt-$SBT_VERSION.deb http://dl.bintray.com/sbt/debian/sbt-$SBT_VERSION.deb && \ | |
dpkg -i sbt-$SBT_VERSION.deb && \ | |
rm sbt-$SBT_VERSION.deb && \ | |
apt-get update && \ | |
apt-get install -y sbt nano && \ | |
sbt sbtVersion | |
# Define working directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment