Skip to content

Instantly share code, notes, and snippets.

@doorbash
Last active March 7, 2022 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doorbash/dd3fd0e04098eef898d2a836bcc351b8 to your computer and use it in GitHub Desktop.
Save doorbash/dd3fd0e04098eef898d2a836bcc351b8 to your computer and use it in GitHub Desktop.
coredns docker compose config
example.com {
file db.example.com
log
}
$ORIGIN example.com.
$TTL 1h
@ IN SOA ns1.example.com. info.exmaple.com. (
2020010510 ; Serial
1d ; Refresh
2h ; Retry
4w ; Expire
1h) ; Minimum TTL
@ IN A 1.2.3.4
@ IN NS ns1.example.com.
ns1 IN CNAME @
www IN CNAME @
coredns:
restart: always
logging:
driver: "json-file"
options:
max-size: "200m"
volumes:
- ./docker/coredns/Corefile:/Corefile
- ./docker/coredns/db.example.com:/db.example.com
ports:
- "53:53/udp"
image: coredns/coredns:latest
@doorbash
Copy link
Author

doorbash commented Mar 7, 2022

dig +short @localhost -p 53 A example.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment