observability: run prometheus/loki/grafana as 1000:1000 (rootless uid mapping)
Container root maps to a subuid that owns nothing under /opt, so the data-dir writes fail. Container uid 1000 is the invoking user in rootless podman.
This commit is contained in:
1 parent
765fd2902a
commit
3c3f90e4c5
2 files changed
+24
No files matched your search
@@ -103,6 +103,9 @@ services:
|
||||
image: docker.io/prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
restart: unless-stopped
|
||||
# Rootless: container uid 1000 maps to the invoking user, so the
|
||||
# container can write its /opt/prometheus/data bind mount.
|
||||
user: "1000:1000"
|
||||
command:
|
||||
- --config.file=/etc/prometheus/prometheus.yml
|
||||
- --storage.tsdb.path=/prometheus
|
||||
@@ -123,6 +126,9 @@ services:
|
||||
image: docker.io/grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
# Rootless: container uid 1000 maps to the invoking user, so the
|
||||
# container can write its /opt/grafana/data bind mount.
|
||||
user: "1000:1000"
|
||||
environment:
|
||||
GF_SERVER_ROOT_URL: "https://grafana.franksdank.cloud"
|
||||
GF_SECURITY_ADMIN_USER: "${GRAFANA_ADMIN_USER}"
|
||||
@@ -144,6 +150,9 @@ services:
|
||||
image: docker.io/grafana/loki:latest
|
||||
container_name: loki
|
||||
restart: unless-stopped
|
||||
# Rootless: container uid 1000 maps to the invoking user, so the
|
||||
# container can write its /opt/loki/data bind mount.
|
||||
user: "1000:1000"
|
||||
command: ["-config.file=/etc/loki/loki-config.yaml"]
|
||||
ports:
|
||||
- "3100:3100"
|
||||
|
||||
Reference in new issue
Block a user