Closed sudogreg closed 4 years ago
Try the following; edit the docker-compose.yml by hand and add hostname: your_hostname
under the unbound
services directive. I.e.:
unbound:
image: secns/unbound:latest
restart: always
container_name: unbound
hostname: your_hostname
environment:
- DO_IPV6=no
- HIDE_VERSION=yes
volumes:
- /opt/automated-pihole/unbound/pi-hole.conf:/etc/unbound/unbound.conf.d/pi-hole.conf
- /opt/automated-pihole/unbound/root.hints:/var/lib/unbound/root.hints
networks:
pihole_net:
ipv4_address: 10.0.0.2
did exactly that using a fresh server install and its still showing unbound.automatedpihole_pihole_net in that field on the pihole dashboard.
now aftera reboot it shows 10.0.0.2 for a few minutes then goes back to dns name (all on the main pihole dashboard) i can attach pics if needed
Ah, I now see what you mean. You're referring to the network name. Unbound is the container name of unbound (happy little coincidence) and automatedpihole_pihole_net is the default network name, setup by Compose.
You can override the network name with the COMPOSE_PROJECT_NAME
environment variable in your docker-compose.yml
(located in /opt/automated-pihole
). For more info, check: https://docs.docker.com/compose/reference/envvars/
i have to admit - this is perfect for DNS for my small rural wisp - i am a network guy, not so much with docker - but if there is a way to change the name using the .env file (i did try, many times, even broke it once) i would really appreciate when you have time a little more guidance. i will keep trying, and if i get it i will post again. thank you
Closing, as there has been no activity on this issue for almost a year.
all cached queries are pulling from - unbound.automatedpihole_pihole_net
and would like to try and show the actual hostname of the server