Add init Container

The Config dir needs to be writable by uid/gid 1000
  This commit adds a container that sets the right uid/gid and then sleeps indefinitely
This commit is contained in:
Markus Küffner
2022-02-26 00:38:07 +01:00
parent 0ddab77769
commit c428a624a9

View File

@@ -5,6 +5,8 @@ x-klipper-svc: &klipper-svc
restart: unless-stopped
logging:
driver: none
depends_on:
- init
command:
- "-I"
- "run/klipper.tty"
@@ -32,6 +34,17 @@ x-ustreamer-svc: &ustreamer-svc
version: "3.4"
services:
## Config dir needs to be writable by uid/gid 1000
## This container sets the right uid/gid and then sleeps indefinitely
init:
image: busybox:latest
container_name: init
command: >
sh -c "chown -R 1000:1000 /prind/config &&
sleep infinity"
volumes:
- .:/prind
## Klippy Services
##
klipper:
@@ -73,6 +86,7 @@ services:
- "-l"
- "log/moonraker.log"
depends_on:
- init
- klipper
- traefik
volumes: