From 7097c839f3974cdb163ae5617e6e5c6643c0d5ef Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Mon, 12 Feb 2024 13:29:57 +0700 Subject: [PATCH] Create Dockerfile --- Dockerfile | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..70637b6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,58 @@ +FROM ghcr.io/siwatinc/siwat-ubuntubaseimage:jammy + +ARG DEBIAN_FRONTEND=noninteractive +ENV TZ=Asia/Bangkok + +# User Creation +RUN useradd -ms /bin/bash octoprint && adduser octoprint dialout +RUN useradd -ms /bin/bash klippy && adduser klippy dialout +RUN chown printeruser:printeruser /opt/printstack +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 +RUN mkdir /opt/printstack/data/klipper +RUN git clone https://github.com/KevinOConnor/klipper +RUN ./klipper/scripts/install-ubuntu-18.04.sh +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 + +########################## \ No newline at end of file