-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (51 loc) · 1.89 KB
/
Copy pathDockerfile
File metadata and controls
65 lines (51 loc) · 1.89 KB
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
55
56
57
58
59
60
61
62
63
64
65
#FROM openjdk:8-jdk-alpine
FROM ubuntu
# Get the python script required for "add-apt-repository"
# Configure the openjdk repo
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:openjdk-r/ppa
# Install OpenJDK 8, X11 libraries, and wget
RUN add-apt-repository ppa:webupd8team/java && apt-get update \
&& apt-get install -y \
libxext-dev libxrender-dev libxtst-dev \
openjdk-8-jdk \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/*
# wget IntelliJ IDEA
COPY ideaIC-2016.3.2.tar.gz /tmp
RUN mv /tmp/ideaIC-2016.3.2.tar.gz /tmp/intellij.tar.gz
RUN mkdir /opt/intellij \
&& tar -xzf /tmp/intellij.tar.gz -C /opt/intellij --strip-components=1 \
&& rm -rf /tmp/*
ENV SCALA_HOME /usr/local/share/scala
ENV PATH $PATH:$SCALA_HOME/bin
ENV SCALA_VERSION 2.11.8
RUN apt-get install wget tar bash && \
wget --quiet http://downloads.lightbend.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz && \
tar -xf scala-$SCALA_VERSION.tgz && \
rm scala-$SCALA_VERSION.tgz && \
mv scala-$SCALA_VERSION $SCALA_HOME
RUN mkdir -p /scala/akkacrawl
WORKDIR /tmp
RUN wget https://dl.bintray.com/sbt/native-packages/sbt/0.13.12/sbt-0.13.12.tgz --no-check-certificate
RUN tar -xvzf sbt-0.13.12.tgz
RUN cp sbt/bin/* /usr/bin
RUN rm -rf sbt-0.13.12.tgz sbt
ENV USERNAME dev
RUN useradd -m $USERNAME && \
echo "$USERNAME:$USERNAME" | chpasswd && \
mkdir -p /etc/sudoers.d && \
usermod --shell /bin/bash $USERNAME && \
usermod -aG sudo $USERNAME && \
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
# Replace 1000 with your user/group id
usermod --uid 1000 $USERNAME && \
groupmod --gid 1000 $USERNAME && \
chown -R $USERNAME /scala
USER $USERNAME
WORKDIR /scala/akkacrawl
CMD ["/opt/intellij/bin/idea.sh"]