moonraker-klipper-docker/printer-daemon/Dockerfile

66 lines
1.6 KiB
Docker
Raw Normal View History

2024-02-12 06:29:57 +00:00
FROM ghcr.io/siwatinc/siwat-ubuntubaseimage:jammy
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Bangkok
# User Creation
2024-02-13 16:30:12 +00:00
RUN useradd -ms /bin/bash klippy
RUN usermod -aG dialout klippy
RUN useradd -ms /bin/bash printeruser
RUN usermod -aG dialout printeruser
RUN addgroup --system printfarm
RUN usermod -aG printfarm klippy
RUN usermod -aG printfarm printeruser
RUN mkdir /opt/printstack
RUN chown printeruser:printfarm /opt/printstack
2024-02-12 06:29:57 +00:00
USER root
# APT Dependencies
RUN apt-get update && apt-get install -y \
cmake \
g++ \
wget \
unzip \
psmisc \
git \
python3-virtualenv \
virtualenv \
python3-dev \
libffi-dev \
build-essential \
tzdata \
zlib1g-dev \
libjpeg-dev \
ffmpeg \
iputils-ping \
sudo
##########################
# Klipper #
##########################
USER root
COPY klippy.sudoers /etc/sudoers.d/klippy
RUN rm -f /bin/systemctl
RUN ln -s /bin/true /bin/systemctl
USER printeruser
WORKDIR /opt/printstack
2024-02-13 16:30:12 +00:00
RUN mkdir -p /opt/printstack/data/klipper
2024-02-12 06:29:57 +00:00
RUN git clone https://github.com/KevinOConnor/klipper
2024-02-13 16:30:12 +00:00
RUN chmod +x ./klipper/scripts/install-ubuntu-22.04.sh
RUN ./klipper/scripts/install-ubuntu-22.04.sh
2024-02-12 06:29:57 +00:00
USER root
RUN rm -f /bin/systemctl
##########################
# Moonraker #
##########################
USER printeruser
EXPOSE 7125
EXPOSE 7130
WORKDIR /opt/printstack
RUN git clone https://github.com/Arksine/moonraker.git
RUN mkdir -p /opt/printstack/data/moonraker
RUN moonraker/scripts/install-moonraker.sh -d /opt/printstack/data/moonraker -z
2024-02-13 16:30:12 +00:00
##########################