This is a docker project that is used to spin up a CoreDNS server.
CoreDNS uses a configuration file
Corefile to specify what
servers listen on which port(s), the protocols used by the server, and for
which zone the server is authoritative. This file is located at
config/Corefile and is mounted to /root when the CoreDNS
container is ran.
A minimal Corefile is included in this repository and can be configured following the scheme shown below.
ZONE:[PORT] {
[PLUGIN]...
}
A list of plugin(s) used by the CoreDNS
To run the xvxd4sh/coredns image via Docker:
docker run xvxd4sh/coredns:latest
Modify the docker-compose.yml file similar to the one below to use Docker Compose.
---
version: "3.7"
services:
redirect-dns:
# Run the container normally
build:
# VERSION must be specified on the command line:
# e.g., --build-arg VERSION=0.0.1
context: .
dockerfile: Dockerfile
image: xvxd4sh/coredns
container_name: coredns
init: true
restart: on-failure
volumes:
- './config:/root'
Start the container and detach:
docker compose up --detach
Pull the new image from Docker Hub:
docker compose pull
Recreate the running container by following the previous instructions:
docker compose up --detach
Stop the running container:
docker stop <container_id>
Pull the new image:
docker pull xvxd4sh/coredns:latest
Recreate and run the container by following the previous instructions.
| Mount point | Purpose |
|---|---|
./config:/root | Specifies the addresses for redirection |
The following ports are exposed by this container:
| Port | Purpose |
|---|---|
| 53 | listening for DNS queries |
The sample Docker composition publishes the exposed port at 53.
There are no required environment variables.
We welcome contributions! Please see CONTRIBUTING.md for
details.
This project is in the worldwide public domain.
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
Content type
Image
Digest
sha256:8e7aa4839…
Size
14.4 MB
Last updated
about 4 years ago
docker pull xvxd4sh/coredns:nightly