-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (46 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
58 lines (46 loc) · 1.17 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
# Use a base image with OpenGL support (e.g., NVIDIA's official OpenGL image)
FROM nvidia/opengl:1.2-glvnd-runtime-ubuntu20.04
# Install required packages
# RUN apt-get update && apt-get install tzdata && apt-get install -y \
# build-essential \
# cmake \
# libglfw3-dev \
# libglew-dev
RUN apt-get update && apt-get install tzdata && apt-get install -y \
g++ \
firefox \
python3 \
cmake \
git \
build-essential \
libglfw3 \
libglfw3-dev \
xorg \
xvfb \
xauth \
x11vnc \
libgl1-mesa-dev \
libglu1-mesa-dev
RUN git clone --recursive https://github.com/Dav1dde/glad.git /tmp/glad
RUN cd /tmp/glad/cmake && \
cmake . && \
make
RUN cd /usr/local/lib/ \
git clone https://github.com/glfw/glfw.git \
cd glfw \
cmake . \
make \
sudo make install
ENV XAUTHORITY=/.Xauthority
# Set the working directory
WORKDIR /app
# Copy the source code into the container
COPY . /app
# Build the project
RUN cmake . && make
EXPOSE 8080
# Build the project
# RUN ./bin/local-docker-make.sh
# Set the entrypoint to run the compiled executable
CMD [ "/usr/bin/firefox" ]
ENTRYPOINT [ "./GraphicsEngine" ]