This repository contains the configuration files to set up a lab environment for practicing DNS Server with Docker containers.
The lab consists of one container and a compose file to set up the environment.
Clone this repository to your local machine:
git clone https://github.com/PXL-Systems-Advanced/dnslab.git
cd dnslab
Use Docker Compose to build the Docker image, create a bridge network (docker-dns_mynetwork), and start the container (dns_server).
docker compose up -d --build
Check the status of the containers:
docker ps
You should see the dns_server
container running.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
xxxxxxxxxxxx docker-dns "named -g -c /etc/bi…" 35 seconds ago Up 34 seconds 0.0.0.0:8053->53/tcp, 0.0.0.0:8053->53/udp dns_server
The bridge network should also be created:
docker network ls
xxxxxxxxxxxx dnslab_mynetwork bridge local
docker exec -it dns_server sh
In the folder where the docker-compose.yml
file is located, run:
docker compose down
[+] Running 2/2
✔ Container dns_server Removed 0.3s
✔ Network docker-dns_mynetwork Removed 0.1s