Docker /tmp permission problem

  • What Grafana version and what operating system are you using?
    dietpi 7.5.2 debian bullseeye
    docker container grafana latest

  • What are you trying to achieve?
    start docker container successfully

  • How are you trying to achieve it?
    docker-compose

  • What happened?
    container doesn’t start

  • What did you expect to happen?
    container run

  • Can you copy/paste the configuration(s) that you are having problems with?

grafana:
image: grafana/grafana:latest
container_name: grafana
restart: always
user: “1000”
network_mode: host
volumes:
- ./grafana/data:/var/lib/grafana # data path

  • ./grafana/provisioning:/etc/grafana/provisioning
    • ./configfiles/custom.ini:/etc/grafana/grafana.ini
      environment:
  • GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource
  • GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
  • GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

Error: ✗ Get “https://grafana.com/api/plugins/repo/grafana-clock-panel”: dial tcp: lookup grafana.com on 127.0.0.1:53: read udp 127.0.0.1:55701->127.0.0.1:53: read: connection refused
Error: ✗ failed to create temporary file: open /tmp/376482387.zip: permission denied
Error: ✗ failed to create temporary file: open /tmp/112431570.zip: permission denied
Error: ✗ failed to create temporary file: open /tmp/506707309.zip: permission denied
Error: ✗ failed to create temporary file: open /tmp/746178320.zip: permission denied

I use grafana as part of my home assistant docker install. Yesterday I have upgraded debian buster to debian bullseye. Exact the same config has worked fine before.

The data files are stored as user 1000 (dietpi) and the user can create files in tmp.

dietpi in DietPi in ~ ✦ ❯ id
uid=1000(dietpi) gid=1000(dietpi) Gruppen=1000(dietpi),4(adm),5(tty),20(dialout),24(cdrom),27(sudo),29(audio),33(www-data),44(video),46(plugdev),60(games),100(users),101(input),108(netdev),121(render),997(gpio),998(i2c),999(spi)
dietpi in DietPi in ~ ✦ ❯ touch /tmp/4947
dietpi in DietPi in ~ ✦ ❯

I just don’t understand were the error comes from. What is meant, the /tpm of the host or /tmp inside the container?
Can someone point me to the right direction.
TIA Micha

The problem is that inside the container not a writable tmp dir is.
Now I have set

  • TMPDIR=/var/lib/grafana/tmp
    in docker compose file. Now it works