-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
52 lines (45 loc) · 2.03 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# if you want separate pihole and unbound docker containers since the combo doesn't update pihole as often as pihole updates their own container
# you can build a new stack using portainer with this as well
version: '3'
volumes:
pihole:
dnsmasq:
services:
pihole:
image: pihole/pihole:latest
hostname: pihole.home #change to match your hostnaming scheme
container_name: pihole
privileged: true
volumes:
- 'pihole:/etc/pihole'
- 'dnsmasq:/etc/dnsmasq.d'
dns:
- '127.0.0.1'
network_mode: host
environment:
- 'FTLCONF_LOCAL_IPV4=$YOURSERVERIP'
- 'TZ=$TIMEZONE' #or your timezone https://gist.github.com/Skipants/788819
- 'PIHOLE_DNS=127.0.0.1#5053' #if you find it isn't resolving DNS queries, find the unbound IP
#address in portainer or through terminal and make it your unbound
- 'INTERFACE=eth0' #containers IP address. I.E. 172.19.0.2 rather than 127.0.0.1
- 'DNSMASQ_LISTENING=eth0'
restart: unless-stopped
unbound:
image: klutchell/unbound:latest
container_name: unbound
ports:
- '5053:53/udp'
- '5053:53/tcp'
restart: unless-stopped
# test that your unbound container is working properly by opening your ssh terminal
# for the pi or server that you are running this on:
# dig google.com -p 5053 @127.0.0.1
# you may also change the @ ip address to the physical ip of the server.
# in the event that it times out, follow instructions from above ^
#to find info about container through terminal like IP address and things,
#type docker inspect $CONTAINER_NAME where $CONTAINER_NAME is the name of the
#container you wish to inspect.
# The $ symbol reflects a wildcard. You can use that wildcard if you wish and just add them as
# your environment variables. Some just like to change the info right on the compose
# so that you don't have to worry about missing the environment variable when you deploy the containers
# i.e. TIMEZONE as the variable name and America/New_York as the value.