issue which is happening only on NAS Synology for grafana, loki, prometheus containers:
ERROR: for prometheus Cannot start service prometheus: OCI runtime create failed: container_linux.go:367: starting container process caused: chdir to cwd ("/prometheus") set in config.json failed: permission denied: unknown
this doesn’t help:
init-prometheus:
profiles:
- init
image: ubuntu
user: root
command: chown -R 65534:65534 /prometheus
volumes:
- ./prometheus/data:/prometheus
I run prometheus and other containers “normally” without any strange things for access:
prometheus:
image: prom/prometheus
restart: unless-stopped
environment:
- TC=UTC
volumes:
- ./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
- ./prometheus/data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.enable-remote-write-receiver
- --log.level=debug
ports:
- 9090:9090
How to fix this and at the same time doesn’t affect security of NAS Synology? What is the best practice for this use case?