forked from guardian/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dev
39 lines (31 loc) · 999 Bytes
/
Dockerfile-dev
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
FROM java:openjdk-8
#Install sbt
ENV SBT_VERSION 0.13.11
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 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Node.js
RUN \
curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
apt-get update && \
apt-get install -y --no-install-recommends build-essential nodejs && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Create config files
RUN mkdir -p /etc/gu/ && echo 'STAGE=DEV' > /etc/gu/install_vars
VOLUME /frontend
WORKDIR /frontend
EXPOSE 9000
# Build app once to populate node and sbt cache
ADD . /source
RUN cd /source && \
make install compile && \
cd /source && \
./sbt compile && \
rm -rf /source
# Add useful info in .bashrc
ADD docker-dev-startup.sh /root/.startup.sh
RUN echo 'source /root/.startup.sh' >> /root/.bashrc