-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (49 loc) · 1.32 KB
/
docker-compose.yml
File metadata and controls
49 lines (49 loc) · 1.32 KB
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
services:
dns:
build:
context: .
dockerfile: Dockerfile
container_name: dns-server
restart: unless-stopped
ports:
# Map host port 53 to container port 53 (UDP)
- "53:53/udp"
# Uncomment for TCP support if needed
# - "53:53/tcp"
environment:
# DNS server configuration
DNS_PORT: "53"
DNS_BIND: "0.0.0.0"
DNS_BIND6: "::"
DNS_CACHE_SIZE: "10000"
DNS_TIMEOUT: "3000"
# Set to "true" for sequential upstream queries
DNS_SEQUENTIAL: "false"
# Set to "true" to disable IPv4 or IPv6
DNS_NO_IPV4: "false"
DNS_NO_IPV6: "false"
# Resource limits
deploy:
resources:
limits:
memory: 256M
cpus: '0.5'
reservations:
memory: 128M
cpus: '0.25'
# Health check - verify DNS server responds
healthcheck:
test: ["CMD-SHELL", "echo '' | nc -u -w1 127.0.0.1 53 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Network mode - use host network for better performance (optional)
# Uncomment the following line and comment out 'ports' section for host networking
# network_mode: host