forked from decker-edu/decker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
68 lines (51 loc) · 2.23 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM ubuntu:focal as base
LABEL maintainer="[email protected]"
RUN
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
wget unzip zip libbz2-dev curl gnupg \
sassc
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
export DEBIAN_FRONTEND=noninteractive && apt-get update && \
export DEBIAN_FRONTEND=noninteractive && apt-get install -y yarn npm && npm install [email protected] -g
#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 export DEBIAN_FRONTEND=noninteractive && 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
RUN wget -qO- https://get.haskellstack.org/ | sh
FROM base as deps
WORKDIR /deps
COPY ./stack.yaml stack.yaml
COPY ./package.yaml package.yaml
RUN stack build --only-snapshot
FROM deps as build
WORKDIR /decker
COPY . /decker
ARG MAKE_FLAGS
RUN make ${MAKE_FLAGS} install
RUN ldd /root/.local/bin/decker | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /root/.local/bin
FROM ubuntu:focal as decker
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y \
graphviz \
gnuplot \
rsync \
unzip \
zip
ENV PATH="/root/.local/bin:${PATH}"
COPY --from=build /root/.local /root/.local
#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 export DEBIAN_FRONTEND=noninteractive && 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
ENTRYPOINT ["decker"]