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
|
ENV TZ=Asia/Bangkok
|
||||||
|
|
||||||
# User Creation
|
# User Creation
|
||||||
RUN useradd -ms /bin/bash octoprint && adduser octoprint dialout
|
RUN useradd -ms /bin/bash klippy
|
||||||
RUN useradd -ms /bin/bash klippy && adduser klippy dialout
|
RUN usermod -aG dialout klippy
|
||||||
RUN chown printeruser:printeruser /opt/printstack
|
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
|
USER root
|
||||||
|
|
||||||
# APT Dependencies
|
# APT Dependencies
|
||||||
|
@ -38,9 +44,10 @@ RUN rm -f /bin/systemctl
|
||||||
RUN ln -s /bin/true /bin/systemctl
|
RUN ln -s /bin/true /bin/systemctl
|
||||||
USER printeruser
|
USER printeruser
|
||||||
WORKDIR /opt/printstack
|
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 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
|
USER root
|
||||||
RUN rm -f /bin/systemctl
|
RUN rm -f /bin/systemctl
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
printeruser ALL=(ALL:ALL) NOPASSWD: ALL
|
Loading…
Reference in New Issue