forked from lukasmonk/lucaschessR2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 1.05 KB
/
Copy pathDockerfile
File metadata and controls
37 lines (26 loc) · 1.05 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
# Build with:
# docker build --network host . -t lucaschess
# Run With:
# docker run -it -e "DISPLAY=$DISPLAY" -v "$HOME/.Xauthority:/lucaschess/.Xauthority:ro" -v "$PWD/UserData:/lucaschess/UserData" --network host --rm lucaschess
FROM python:3.13-bullseye
WORKDIR /lucaschess/
ENV HOME=/lucaschess/
RUN apt-get update && \
apt-get install -y --no-install-recommends libqt5gui5 libpulse-mainloop-glib0 && \
rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
WORKDIR /lucaschess/bin/_fastercode
RUN chmod a+x ./linux64.sh && ./linux64.sh
WORKDIR /lucaschess/bin/OS/linux
RUN chmod a+x ./RunEngines && ./RunEngines
WORKDIR /lucaschess/bin
RUN chmod a+x LucasR.py
# Create and switch to a non-root user
RUN useradd -ms /bin/bash lucaschess && chown -R lucaschess:lucaschess /lucaschess
USER lucaschess
# To debug problems with Qt, enable the following line:
# ENV QT_DEBUG_PLUGINS=1
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD ["./LucasR.py", "-healthcheck"]
CMD ["./LucasR.py"]