From c428a624a92d58faed2906472bf275fff702884f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20K=C3=BCffner?= Date: Sat, 26 Feb 2022 00:38:07 +0100 Subject: [PATCH] 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 --- docker-compose.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index 0f60494..f3928cf 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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: