-
Notifications
You must be signed in to change notification settings - Fork 82
/
Dockerfile
48 lines (40 loc) · 1.07 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
FROM python:3.12-bookworm as build
ARG REPO=https://github.com/KlipperScreen/KlipperScreen
ARG VERSION=master
RUN apt update \
&& apt install -y \
libgirepository1.0-dev \
libdbus-glib-1-dev \
cmake \
libsystemd-dev \
&& apt clean
WORKDIR /opt
RUN git clone ${REPO} klipperscreen \
&& cd klipperscreen \
&& git checkout ${VERSION}
RUN python -m venv venv \
&& venv/bin/pip install -r klipperscreen/scripts/KlipperScreen-requirements.txt
FROM python:3.12-slim-bookworm as run
RUN apt update \
&& apt install -y \
git \
xdotool \
x11-xserver-utils \
libglib2.0-0 \
libgirepository-1.0-1 \
gir1.2-gtk-3.0 \
libopenjp2-7 \
fonts-freefont-ttf \
libcairo2 \
libatlas3-base \
libdbus-glib-1-2 \
&& apt clean
WORKDIR /opt
COPY --from=build /opt/klipperscreen ./klipperscreen
COPY --from=build /opt/venv ./venv
## Start klipperscreen
ENV XAUTHORITY=/tmp/.Xauthority
ENV DISPLAY=:0
VOLUME ["/opt/cfg"]
ENTRYPOINT ["/opt/venv/bin/python", "klipperscreen/screen.py"]
CMD ["-c", "cfg/klipperscreen.conf"]