-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (36 loc) · 1.1 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
# syntax=docker/dockerfile:1
FROM debian:bookworm-slim AS prusalink_builder
# From https://github.com/prusa3d/Prusa-Link/blob/master/image_builder/image_builder.py
# except for pi-only deps: pigpio python3-libcamera
RUN apt-get update \
&& apt-get install -y \
build-essential \
git \
python3-pip \
libcap-dev \
libmagic1 \
libturbojpeg0 \
libatlas-base-dev \
libffi-dev \
cmake \
iptables \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --break-system-packages PrusaLink
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y \
python3-pip \
libmagic1 \
libturbojpeg0 \
iptables \
&& rm -rf /var/lib/apt/lists/*
COPY --from=prusalink_builder /usr/local/ /usr/local/
RUN mkdir -p /etc/prusalink
RUN groupadd -g 1000 prusalink \
&& useradd -rm -u 1000 -d /home/prusalink -s /bin/bash -g prusalink -G dialout,video prusalink \
&& usermod -aG video prusalink
USER prusalink
WORKDIR /home/prusalink
# For debugging
#CMD ["prusalink", "-f", "-i"]
CMD ["prusalink", "-f"]