-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (41 loc) · 1.31 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:16.04
ARG USER_HOME_DIR="/root"
ENV SCALA_VERSION 2.12.6
ENV SBT_VERSION 0.13.16
# Update the repository sources list and install dependencies
RUN apt-get update
RUN apt-get install -y software-properties-common unzip htop rsync openssh-client jq
# install Java
USER root
RUN mkdir -p /usr/share/man/man1 && \
apt-get update -y && \
apt-get install -y openjdk-8-jdk
RUN apt-get install unzip -y && \
apt-get autoremove -y
# Install Scala
## Piping curl directly in tar
RUN \
apt-get install curl --assume-yes && \
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 && \
sbt sbtVersion
VOLUME "$USER_HOME_DIR/.sbt"
# Install nodejs
RUN \
curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN \
apt-get install nodejs --assume-yes
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8
# Final user and home config
RUN useradd --create-home --shell /bin/bash jenkins
USER jenkins
WORKDIR /home/jenkins