aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Dockerfile
diff options
context:
space:
mode:
authorsillyfrog <816454+sillyfrog@users.noreply.github.com>2020-04-03 10:19:26 +1000
committerGitHub <noreply@github.com>2020-04-02 20:19:26 -0400
commit0342c50033b998b191fb2aed733ec260eb6a8d81 (patch)
tree442b0ee29f74fe9d0b0a8c18bac695b6caea808f /scripts/Dockerfile
parentb2a29c63497d1421cd7b0579f2e87dd32bb5e6c4 (diff)
downloadkutter-0342c50033b998b191fb2aed733ec260eb6a8d81.tar.gz
kutter-0342c50033b998b191fb2aed733ec260eb6a8d81.tar.xz
kutter-0342c50033b998b191fb2aed733ec260eb6a8d81.zip
scripts: Update Docker file for current Klipper version (#2666)
Signed-off-by: Trent Davis <tgh@sillyfrog.com>
Diffstat (limited to 'scripts/Dockerfile')
-rw-r--r--scripts/Dockerfile12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/Dockerfile b/scripts/Dockerfile
index 3752cd92..c178c1ab 100644
--- a/scripts/Dockerfile
+++ b/scripts/Dockerfile
@@ -1,5 +1,7 @@
# This is an example Dockerfile showing how it's possible to install Klipper in Docker.
-# IMPORTANT: This Dockerfile must be moved to the repo root directory before building.
+# IMPORTANT: The docker build must be run from the root of the repo, either copy the
+# Dockerfile to the root, or run docker build with "-f", for example:
+# docker build . -f scripts/Dockerfile -t klipper
# Note that the host still needs to run Linux to connect the printers serial port to
# the container.
# When running, the serial port of your printer should be connected, including an
@@ -12,7 +14,7 @@
# /home/klippy/.config/
# For more Dockerfile examples with Klipper (and Octoprint) see:
# https://github.com/sillyfrog/OctoPrint-Klipper-mjpg-Dockerfile
-FROM debian
+FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y sudo
@@ -32,7 +34,11 @@ COPY . klipper/
USER root
RUN echo 'klippy ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/klippy && \
chown klippy:klippy -R klipper
+# This is to allow the install script to run without error
+RUN ln -s /bin/true /bin/systemctl
USER klippy
-RUN ./klipper/scripts/install-octopi.sh
+RUN ./klipper/scripts/install-ubuntu-18.04.sh
+# Clean up install script workaround
+RUN sudo rm -f /bin/systemctl
CMD ["/home/klippy/klippy-env/bin/python", "/home/klippy/klipper/klippy/klippy.py", "/home/klippy/.config/printer.cfg"]