-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
44 lines (37 loc) · 880 Bytes
/
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
FROM ubuntu:18.04
ARG GLFW_VERSION=3.3
# Install dependencies.
RUN apt-get update -y && \
apt-get install -y \
cmake \
git \
curl \
libssl-dev \
libxml2-dev \
libyaml-dev \
libgmp-dev \
libreadline-dev \
libz-dev \
libevent-dev \
xorg-dev \
x11-xserver-utils \
xvfb \
fluxbox
# Install Crystal.
RUN curl -fsSL https://crystal-lang.org/install.sh | bash
# Build and install GLFW.
RUN git clone -b $GLFW_VERSION https://github.com/glfw/glfw.git && \
cd glfw && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF .. && \
cmake --build . --target install && \
cd ../.. && \
rm -rf glfw
RUN groupadd -r build && \
useradd --no-log-init -m -r -g build build
COPY entrypoint.sh /entrypoint.sh
USER build
WORKDIR /home/build
ENTRYPOINT ["/entrypoint.sh"]
CMD ["fluxbox"]