summaryrefslogtreecommitdiff
path: root/meta-unit-virtualization/recipes-containers
diff options
context:
space:
mode:
authorunitexe <unitexe70@gmail.com>2026-09-17 23:25:58 -0500
committerunitexe <unitexe70@gmail.com>2026-10-01 11:23:54 -0500
commitc7d9781ef8820b9f8fcb7656dae7b6c77215d75d (patch)
tree1249761f874deb222f3cb88f584db7c2aa8bb82b /meta-unit-virtualization/recipes-containers
parent84e9b0bc4b50136e833ab56830c2b687d851c48e (diff)
Fix rootless podman prometheus exporter
- Exporter runs as nobody, the rootless podman socket belongs to svc and only svc can use it - The podman library inside the exporter decides its rootless by looking for per-user config in $HOME/.config - $HOME inside the image is /home and /home/.config doesn't exist and the library treats a missing config directory as fatal error - The config directory being mounted has to belong to the user reading it Ironically, the directory stays empty and nothing ever reads from it. The mount gets the exporter past a startup check that assumes its running on a normal host, not in a minimal busybox container.
Diffstat (limited to 'meta-unit-virtualization/recipes-containers')
-rw-r--r--meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container b/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container
index 0cdfb0b..bc94095 100644
--- a/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container
+++ b/meta-unit-virtualization/recipes-containers/prometheus-podman-exporter-rootless/files/prometheus-podman-exporter.container
@@ -11,6 +11,7 @@ Volume=%t/podman/podman.sock:/run/podman/podman.sock:ro
Environment=CONTAINER_HOST=unix:///run/podman/podman.sock
PodmanArgs=--userns=keep-id:uid=65534
Exec=--collector.enable-all
+Mount=type=tmpfs,destination=/home/.config,tmpfs-mode=0700,chown
[Service]
Restart=on-failure