Upstream DNS Servers reset after update

Pi-hole Version v5.0 Web Interface Version v5.0 FTL Version v5.0

I set my Upstream DNS servers to Cloudflare.

I have a process that checks for updates daily:

docker pull pihole/pihole:latest
docker stop pihole
docker rm -f pihole
docker run...
docker start pihole

After that, the Upstream DNS server is reset back to Google.

Is that normal? Shouldn't that config be persistent?

Thanks

Dave

What are you using for a compose file or docker run command?

Edit: Automated pulling of docker images is a bad practice.

I'm using docker run:

export DOCKER_DIR=/home/pi/docker

docker run -d \
    --name pihole \
    --net host \
    -e TZ="Europe/London" \
    -e WEBPASSWORD="fred" \
    -e ServerIP=192.168.1.124 \
    -v "$DOCKER_DIR/etc-pihole/:/etc/pihole/" \
    -v "$DOCKER_DIR/etc-dnsmasq.d/:/etc/dnsmasq.d/" \
    -v "$DOCKER_DIR/var-log/:/var/log/" \
    --dns=127.0.0.1 --dns=1.1.1.1 \
    --cap-add=NET_ADMIN \
    --restart=unless-stopped \
    pihole/pihole:latest

The update isn't automated.

Dave

My apologies, I assumed the script that you posted is run daily.

Check $DOCKER_DIR/etc-pihole/setupVars.conf before and after a restart.