# Docker unbound

**URL:** <https://discourse.pi-hole.net/t/docker-unbound/77966>\
**Category:** Community Help\
**Tags:** docker\
**Created:** [March 13, 2025, 3:58pm UTC](https://discourse.pi-hole.net/t/docker-unbound/77966 "2025-03-13T15:58:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![v.livankin](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/v/a9a28c/32.png) [@v.livankin](https://discourse.pi-hole.net/u/v.livankin)\
**Post date:** [March 13, 2025, 3:58pm UTC](https://discourse.pi-hole.net/t/docker-unbound/77966/1 "2025-03-13T15:58:13Z")

</div>

Please share ideas.  
I've setup pi-hole and unboud (custom image) with docker. All forks fine, but with workaround. I've added static IP to unbound container because its impossible to add FQDN as custom DNS server.

docker-compose.yml

```auto
networks:
....
  dns:
    name: dns
    ipam:
      driver: default
      config:
        - subnet: "192.168.12.0/24"
...
services:
...
pihole:
    container_name: pihole
    image: pihole/pihole:latest
    hostname: home
...
    networks:
      - main
      - dns
...
 unbound:
    container_name: unbound
    image: unbound-alpine
    pull_policy: never
    networks:
      dns:
        ipv4_address: 192.168.12.254
....

```

Dockerfile

```auto
FROM alpine:latest
RUN apk add --no-cache unbound
COPY unbound.conf /etc/unbound/unbound.conf
WORKDIR /etc/unbound/
EXPOSE 53
EXPOSE 53/udp
CMD ["unbound", "-c", "/etc/unbound/unbound.conf", "-d"]

```

---

<div class="post-metadata">

**Author:** ![Ladrien](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/ladrien/32/39018_2.png) [@Ladrien](https://discourse.pi-hole.net/u/Ladrien)\
**Post date:** [March 13, 2025, 6:03pm UTC](https://discourse.pi-hole.net/t/docker-unbound/77966/2 "2025-03-13T18:03:50Z")

</div>

What's the issue exactly?

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [April 3, 2025, 6:03pm UTC](https://discourse.pi-hole.net/t/docker-unbound/77966/3 "2025-04-03T18:03:57Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
