Pi-Hole Stats Reset Upon Raspberry Pi Reboot (Docker Setup)

I have a Pi-hole setup on a raspberrypi in a docker container.

I noticed today that after i rebooted my raspberrypi my pi-hole stats reset, and keeps happening after each reboot.

In terminal i have been able to run:

docker ps

docker exec -it pihole /bin/bash

pihole -v

result returned =

Pi-hole version is v5.18.3 (Latest: v5.18.3)
web version is v5.21 (Latest: v5.21)
FTL version is v5.25.2 (Latest: v5.25.2)

Searching the internet I see that you can repair docker installations with the command :

'pihole -r'

But docker installations don't seem to support this?

I am somewhat of a novice user, and any help to resolve this is appreciated.

debug token :

[✓] Your debug token is: https://tricorder.pi-hole.net/hKY9bGoS/

Please also post your compose file or docker run command used to start the container.

My docker-compose.yml file :

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    # For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "80:80/tcp"
    environment:
      TZ: 'Europe/London'
      WEBPASSWORD: 'ThisIsNotMyP@$$w0rd'
    # Volumes store your data between container upgrades
    volumes:
      - './home/piuser/pihole/etc-pihole:/etc/pihole'
      - './home/piuser/pihole/etc-dnsmasq.d:/etc/dnsmasq.d'
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped

The queries are not stored in the database because your database file is broken.
This file is too small to be a complete database file (it should be at least 80 Kb):

*** [ DIAGNOSING ]: Pi-hole FTL Query Database
-rw-rw-r-- 1 pihole pihole 28K Oct 30 22:15 /etc/pihole/pihole-FTL.db

Stop the container, go to /home/piuser/pihole/etc-pihole in the host and rename or delete pihole_FTL.db. Then restart the container. A new database should be created.

Fantastic, all good now.

Appreciate your help. :ok_hand: