-
Build the image of the required implementation using:
docker build -t <image_name>:oct -f <directory_name>/Dockerfile .
where, the
image_namewould bebindanddirectory_namewould beBindto build a Bind image.
Please note:- Use the
image_namesame as thedirectory_namebut in lowercase. - Each Docker image consumes ~ 1-2 GB of disk space.
- Technitium implementation does not have the corresponding Oct, 2020 version, and only the latest commit is used for any build.
By default, the image built uses the code around October 1st, 2020. The links to the exact
commitused are as follows:Bind · Nsd · Knot · PowerDns · CoreDns · Yadifa · MaraDns · TrustDns
To build the image using the latest main branch, pass
trueto the build argumentlatest⚠️ :docker build -t <image_name>:latest -f <directory_name>/Dockerfile --build-arg latest=true .
- Use the
-
Serve a zone file with an implementation using
python3 main.py.usage: main.py [-h] [-z ZONE_FILE_PATH] [-c CONTAINER_NAME] [-p UNUSED_PORT] [-i {bind, nsd, knot, powerdns, coredns, yadifa, maradns, trustdns}] [-l] [-e] Gets an implementation to serve the input or default zone file. Specify an image name and a port to start a new container (also container name if you want to assign a name) or only the name of an existing container to reuse it. optional arguments: -h, --help Show this help message and exit. -z ZONE_FILE_PATH The path to the zone file to be served. (default: db.campus.edu) -i {bind, nsd, knot, powerdns, coredns, yadifa, maradns, trustdns} The docker image name of the implementation to start a container. -p UNUSED_PORT An unused host port to map to port 53 of the container. -c CONTAINER_NAME A name for the container. (default: Random Docker generated name) -l, --latest Serve using the latest image tag. -e Whether the implementation is Technitium. (default: False) -
Query from the host machine using:
dig @127.0.0.1 -p <PORT> +norecurse <QUERY>
where
PORTis the port number used in the previous step to start a container.