working distribution
This commit is contained in:
parent
7097c839f3
commit
2e719f402d
|
@ -0,0 +1,9 @@
|
|||
version: '3'
|
||||
services:
|
||||
printer1:
|
||||
build: ./printer-daemon
|
||||
ports:
|
||||
- "7125:7125"
|
||||
- "7130:7130"
|
||||
volumes:
|
||||
- /var/printfarm/printer1:/opt/printstack/data
|
|
@ -4,9 +4,15 @@ 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
|
||||
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
|
||||
USER root
|
||||
|
||||
# APT Dependencies
|
||||
|
@ -38,9 +44,10 @@ RUN rm -f /bin/systemctl
|
|||
RUN ln -s /bin/true /bin/systemctl
|
||||
USER printeruser
|
||||
WORKDIR /opt/printstack
|
||||
RUN mkdir /opt/printstack/data/klipper
|
||||
RUN mkdir -p /opt/printstack/data/klipper
|
||||
RUN git clone https://github.com/KevinOConnor/klipper
|
||||
RUN ./klipper/scripts/install-ubuntu-18.04.sh
|
||||
RUN chmod +x ./klipper/scripts/install-ubuntu-22.04.sh
|
||||
RUN ./klipper/scripts/install-ubuntu-22.04.sh
|
||||
USER root
|
||||
RUN rm -f /bin/systemctl
|
||||
|
|
@ -0,0 +1 @@
|
|||
printeruser ALL=(ALL:ALL) NOPASSWD: ALL
|
Loading…
Reference in New Issue