Skip to content

Commit 8398683

Browse files
chore: add CoreDNS configuration and service to Docker Compose
- Introduce a new Corefile for custom DNS records and caching. - Add CoreDNS service to the Docker Compose configuration with appropriate ports and volume mapping. - Enable logging and upstream DNS forwarding for enhanced DNS resolution.
1 parent 60a8898 commit 8398683

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

server/Corefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.:53 {
2+
# Custom records
3+
hosts {
4+
172.30.0.10 port.tcp.go
5+
fallthrough
6+
}
7+
8+
# Forward everything else to upstream DNS
9+
forward . 8.8.8.8 1.1.1.1
10+
11+
# Enable logging
12+
log
13+
14+
# Enable caching
15+
cache 30
16+
17+
errors
18+
}

server/docker-compose-tailscale.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ services:
5353
sysctls: # ADD THIS
5454
- net.ipv4.ip_forward=1 # Enable IP forwarding
5555
- net.ipv6.conf.all.forwarding=1
56+
57+
coredns:
58+
image: coredns/coredns:latest
59+
container_name: custom-dns
60+
ports:
61+
- "53:53/udp"
62+
- "53:53/tcp"
63+
volumes:
64+
- ./Corefile:/Corefile
65+
restart: unless-stopped
5666

5767
networks:
5868
rabbit-net:

0 commit comments

Comments
 (0)