-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
47 lines (39 loc) · 1.36 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
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
# Download GHC and cabal
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:hvr/ghc && \
apt-get update && \
apt-get install -y cabal-install-1.18 ghc-7.8.3 cpphs && \
apt-get install -y libpcre3 libpcre3-dev mysql-server \
libmysqlclient-dev screen && \
service mysql start && \
mysqladmin -u root password password
ENV PATH /opt/ghc/7.8.3/bin:/opt/cabal/1.18/bin:$PATH
# Install necessary GHC tools
RUN apt-get install -y happy-1.19.4 alex-3.1.3
ENV PATH /opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
# Create development dirs
RUN mkdir /development && \
mkdir /development/init && \
mkdir /development/bead && \
mkdir /bead-server
# Copy cabal file and install dependencies
COPY "./Bead.cabal" "/development/init/Bead.cabal"
COPY "./docker/container-script/dev-env-setup.sh" "/development/init/dev-env-setup.sh"
RUN apt-get install -y zlib1g-dev libncurses5-dev && \
cd development/init && \
cabal update && \
cabal install -j1 --only-dependencies --reorder-goals
# Directory for sources
VOLUME "/development/bead"
# Directory for running
VOLUME "/bead-server"
# Expose the default port
EXPOSE 8000