Browse Source

scala sbt docker

pull/60/head
Johannes Schickling 7 years ago
parent
commit
9047033022
  1. 65
      scala-sbt-docker/Dockerfile
  2. 11
      scala-sbt-docker/README.md
  3. 17
      scala-sbt-docker/install.sh

65
scala-sbt-docker/Dockerfile

@ -0,0 +1,65 @@
# Based on debian-jessie
FROM openjdk:8
###
# START COPY FROM https://github.com/hseeberger/scala-sbt/blob/master/Dockerfile
###
ENV SCALA_VERSION 2.12.1
ENV SBT_VERSION 0.13.13
# 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 sbt && \
sbt sbtVersion
# Define working directory
WORKDIR /root
###
# END COPY
###
# Install docker
#RUN \
# apt-get install -y apt-transport-https ca-certificates gnupg2 && \
# apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
# echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list && \
# apt-get update && \
# apt-get install -y docker-engine && \
# docker -v
## Install docker-compose
#RUN \
# curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
# chmod +x /usr/local/bin/docker-compose && \
# docker-compose -v
# Install mysql
#ENV DEBIAN_FRONTEND noninteractive
#RUN \
# echo "mysql-community-server mysql-community-server/data-dir select ''" | debconf-set-selections && \
# echo "mysql-community-server mysql-community-server/root-pass password password" | debconf-set-selections && \
# echo "mysql-community-server mysql-community-server/re-root-pass password password" | debconf-set-selections && \
# echo "deb http://repo.mysql.com/apt/debian/ jessie mysql-5.7" > /etc/apt/sources.list.d/mysql.list && \
# apt-get install -y apt-transport-https && \
# apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5 && \
# apt-get update && \
# apt-get install -y mysql-community-client mysql-community-server && \
# mysql --version
#
## Install redis
#RUN \
# apt-get install -y redis-server && \
# redis-server -v

11
scala-sbt-docker/README.md

@ -0,0 +1,11 @@
# nodejs
Minimal NodeJS + NPM image
## Usage
```sh
$ docker run --rm -it -v $(pwd):/source schickling/nodejs
```
Mount your local source folder to the container and run it inside the container.

17
scala-sbt-docker/install.sh

@ -0,0 +1,17 @@
#! /bin/bash
# exit if a command fails
set -e
# install node & npm
apt-get update && apt-get install -y nodejs npm
# alias as node
ln -sf /usr/bin/nodejs /usr/bin/node
# cleanup package manager
apt-get autoclean && apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# prepare dir
mkdir /source
Loading…
Cancel
Save