-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfileProduction
More file actions
63 lines (50 loc) · 1.31 KB
/
DockerfileProduction
File metadata and controls
63 lines (50 loc) · 1.31 KB
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
# Builder
FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu16.04 as builder
LABEL maintainer="[email protected]"
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
build-essential \
g++ \
cmake \
git \
wget \
libfreetype6-dev \
libjpeg-dev \
xorg-dev \
libxrandr-dev \
xcb \
libx11-xcb-dev \
libxcb-randr0-dev \
libxcb-image0-dev \
libgl1-mesa-dev \
libflac-dev \
libogg-dev \
libvorbis-dev \
libopenal-dev \
libpthread-stubs0-dev \
curl \
libudev-dev \
libsfml-dev \
libcsfml-dev
# Installing stack.
RUN curl -sSL https://get.haskellstack.org/ | /bin/sh
COPY . app/
WORKDIR app/
RUN stack clean
RUN stack setup
RUN stack build
RUN stack install
# Final Image
FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu16.04
RUN apt-get update && apt-get -y upgrade
# Necessary at runtime
RUN apt-get install -y libcsfml-dev
RUN apt-get install -y libsfml-dev
RUN apt-get install -y libgmp10
WORKDIR app/
COPY --from=builder /root/.local/bin/AHaskellGame-exe .
COPY --from=builder /root/.local/bin/FallingBalls .
COPY --from=builder /root/.local/bin/ConwaysGameOfLife .
COPY --from=builder /app/resources /app/resources
CMD ["./AHaskellGame-exe"]