-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
40 lines (35 loc) · 1.38 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
FROM ubuntu:14.04
# Set locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV PATH /root/.local/bin/:$PATH
ENV AULA_ROOT_PATH /liqd/aula
ENV AULA_SAMPLES /liqd/html-templates
# Download GHC and cabal
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:hvr/ghc && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442 && \
echo 'deb http://download.fpcomplete.com/ubuntu trusty main' >/etc/apt/sources.list.d/fpco.list && \
apt-get update && \
apt-get install -y \
zlib1g-dev libpq-dev libcurl4-gnutls-dev libicu-dev \
sendmail tmux openjdk-7-jre psmisc Xvfb X11vnc \
chromium-chromedriver \
stack git make vim g++ tidy curl && \
mkdir -p ~/.vnc && x11vnc -storepasswd gandalf ~/.vnc/passwd
# Create development dirs
RUN mkdir -p /liqd/stack /liqd/html-templates
# Copy cabal file and install dependencies
COPY aula.yaml /liqd/aula/aula.yaml
COPY . /liqd/
WORKDIR /liqd/aula
RUN ln -s /liqd/stack .stack-work && \
sed -i -e 's+^packages:+packages:\n- ../sensei+' stack.yaml && \
stack setup && \
stack install --fast --test --coverage --no-run-tests --only-dependencies aula
# Install tooling
RUN stack install --fast --test --coverage --no-run-tests sensei hpc-coveralls hlint