Installing Unbound via Docker

first things I am a total noob at this. I am struggling to get unbound working on docker with Pi-Hole

Pi-hole is working fine (but I had to put it on the host networking in docker) so I have been trying to get unbound installed but it will not talk to the pihole server its something to do with it being on the Host net work and I can’t fine out where to change the network on the unbound container

Can some one point me in the right direction as all the compose-docker.yaml filed I keep trying keep adding the the bridge network.

Thanks

Please share your current compose file and an output of the error logs that indicates the problem.

Hi mayay this is what I am trying to put in the portainer stack

version: ‘3’
networks:
dns_net:
driver:Host
ipam:
config:

  • subnet:10.10.0.0/23 # host subnet
    services:
    unbound:
    container_name: unbound
    image: mvance/unbound:latest
    networks:
    dns_net:
    ipv4_address: 10.10.0.21 #host lan ip address
    volumes:
  • ‘./unbound:/opt/unbound/etc/unbound’
    ports:
  • “5053:5053/tcp”
  • “5053:5053/udp”
    healthcheck:
    disable: true
    restart: unless-stopped

I tried other2 but they all fail at some point but this the latest I am trying

Thanks

Please edit your post and wrap the compose file in a code block (</> icon), as it’s hard to read.
And don’t forget to add a snippet from the log that illustrates the problem.