Dockerfile 1.84 KB
Newer Older
Kristof Korwisi's avatar
Kristof Korwisi committed
1
2
3
4
5
6
7
8
# Builds the decker executable
FROM ubuntu:artful

RUN apt-get update &&	apt-get install -y \
  wget \
  unzip \
  zip

Kristof Korwisi's avatar
Kristof Korwisi committed
9
10
11
12
13
14
15
16
17
18
#set the encoding on UTF-8, so the parser works correctly, german language is also added for umlaute
#source of fix: https://blog.mkowalski.net/2016/05/16/solving-locale-issues-with-docker-containers/
RUN apt-get install --reinstall -y locales && \
        sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
        locale-gen de_DE.UTF-8
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE
ENV LC_ALL de_DE.UTF-8
RUN dpkg-reconfigure --frontend noninteractive locales

Kristof Korwisi's avatar
Kristof Korwisi committed
19
20
21
22
23
24
RUN wget -qO- https://get.haskellstack.org/ | sh

WORKDIR /decker
COPY . /decker
RUN make install

Kristof Korwisi's avatar
Kristof Korwisi committed
25
26
RUN ldd /root/.local/bin/decker | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /root/.local/bin

Kristof Korwisi's avatar
Kristof Korwisi committed
27
28
29
30
31
32
33
34
35
36
37
38
39
# Image that will execute decker
FROM ubuntu:artful

RUN apt-get update && apt-get install -y \
    graphviz \
    gnuplot \
    rsync \
    sassc \
    unzip \
    zip

ENV PATH="/root/.local/bin:${PATH}"
COPY --from=0 /root/.local /root/.local
Kristof Korwisi's avatar
Kristof Korwisi committed
40
41
COPY --from=0 /root/.stack/snapshots/x86_64-linux-nopie/lts-10.10/8.2.2/share/x86_64-linux-ghc-8.2.2/pandoc-citeproc-0.12.2.5/locales/locales-en-US.xml /root/.stack/snapshots/x86_64-linux-nopie/lts-10.10/8.2.2/share/x86_64-linux-ghc-8.2.2/pandoc-citeproc-0.12.2.5/locales/locales-en-US.xml
#COPY --from=0 /root/.stack /root/.stack
Kristof Korwisi's avatar
Kristof Korwisi committed
42
43
44
45
46
47
48
49
50
51
52
53
54

#set the encoding on UTF-8, so the parser works correctly, german language is also added for umlaute
#source of fix: https://blog.mkowalski.net/2016/05/16/solving-locale-issues-with-docker-containers/
RUN apt-get install --reinstall -y locales && \
	sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
	locale-gen de_DE.UTF-8
ENV LANG de_DE.UTF-8
ENV LANGUAGE de_DE
ENV LC_ALL de_DE.UTF-8
RUN dpkg-reconfigure --frontend noninteractive locales

WORKDIR /decker

Kristof Korwisi's avatar
Kristof Korwisi committed
55
ENTRYPOINT ["decker"]