Skip to content

Commit 863edf4

Browse files
vishnu2kmohanclaude
andcommitted
fix(docker): configure Loki tmpfs with correct UID for non-root operation
Loki 3.0.0 runs as a non-root user (UID 10001) by default. The tmpfs mount at /loki must be owned by this user for Loki to write its data. Solution: Set tmpfs uid=10001,gid=10001 to match the Loki container user. This approach maintains non-root security posture matching K8s deployments. Also ensure loki-config.yaml has world-readable permissions (mode 644) so the non-root Loki user can read the mounted config file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2d5908c commit 863edf4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docker-compose.test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,8 @@ services:
635635
volumes:
636636
- ./docker/loki/loki-config.yaml:/etc/loki/local-config.yaml:ro
637637
tmpfs:
638-
- /loki:rw,noexec,nosuid,size=256m
638+
# UID 10001 is the loki user in grafana/loki:3.0.0
639+
- /loki:rw,noexec,nosuid,size=256m,uid=10001,gid=10001
639640
healthcheck:
640641
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"]
641642
interval: 10s

0 commit comments

Comments
 (0)