Skip to content

Guide/helpers how to run Klipper in Docker container via kiuah

Notifications You must be signed in to change notification settings

ybznek/docker-kiauh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

(Still working in progress, may not work yet)

TODO

  • Check guide from start to end
  • Do not pass whole /dev/ to container, but use udev rules to pass specific devices

docker-kiauh

Guide/helpers how to run Klipper/Moonraker/Mainsail/Fluidd in Docker container via kiuah (https://github.com/th33xitus/kiauh)

How does it work

It crates docker container with systemd & kiuah

Caution

  • Follow this guide only if you know what are you doing (scripts are short, you can read them)
  • Used guide may not be the best from security point of view
  • Executed container/deamon will keep restarting on failure (could consume lot of resources if you keep it restarting)

Guide

  1. Get dependencies on your machine
  1. Clone repository & enter to the directory
git clone https://github.com/ybznek/docker-kiauh.git
cd docker-kiauh/
  1. Check/modify config file

You may want to modify config file, especially "klipperConfigInRoot"

./config
  1. Build docker image
./docker-kiuah build
  1. Run docker container as daemon
./docker-kiuah runDaemon
  1. Check status
./docker-kiuah status

There should be sth like

4ead22c9eee2   klipper   "/lib/systemd/systemd"   23 seconds ago   Up 22 seconds             printer

If you see sth like go to "Troubleshoot" section

b518f4e79feb   klipper   "/lib/systemd/systemd"   2 seconds ago   Restarting (255) Less than a second ago             printer
  1. Execute kiuah & install what you want
./docker-kiuah kiuah
  1. (Optional) open terminal (bash) in container
./docker-kiuah bash

Troubleshoot

If container keeps failing, you can use this command to execute to see output

./docker-kiuah run

Usually it keeps failing due to cgroups (you can try to find some generic solution for "systemd in docker", it should help here)

On Ubuntu x86_64 (standard desktop)

  1. Add systemd.unified_cgroup_hierarchy=0 to /etc/default/grub e.g. :
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"
  1. Run
sudo update-grub
  1. Restart PC

On RPI 4 aarch64 (64 bit OS)

  1. add systemd.unified_cgroup_hierarchy=false to /boot/cmdline.txt e.g. :
console=serial0,115200 console=tty1 root=PARTUUID=14b2f967-02 rootfstype=ext4 fsck.repair=yes rootwait systemd.unified_cgroup_hierarchy=false
  1. Restart RPI

Try to execute container in different way, check https://hub.docker.com/r/jrei/systemd-debian

About

Guide/helpers how to run Klipper in Docker container via kiuah

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published