3. Breaking builds understanding
4.10.2025
Using AI as a helper has been extremely helpful sometimes, and completely counterproductive other times.
It turns out I managed to completely break my entire Docker stack because I naively asked AI how to make sure Docker Compose launches during startup of my server. What I didn't know is that it was completely unnecessary to force the service to start — Docker does it automatically. AI doesn't care or know that I don't need to set it up, it just gladly spits out instructions with no context! I ended up with a total mess where when I turned on my server, Docker Desktop was launching by itself and eating up the ports needed for Wazuh to run.
I'll have to erase everything and start from scratch.
All is not lost though. Going through the rabbit hole of troubleshooting these various issues has helped me better understand the stack as a whole and how Docker works.
Here's a breakdown of my understanding of how it all works:
After pulling the Docker images from Wazuh's git repo, Docker Compose lets me launch Wazuh dashboard, Wazuh indexer, and Wazuh manager all at the same time and have each app/container communicate to each other seamlessly. In the docker-compose file, the "master" settings dictate several key settings like IPs and ports that the container stack will run on, default credentials, and volumes. Volumes contain the only data that will stay if I restart the stack, so they contain various log files and important configuration files.
The dashboard container is simple — it just runs the Wazuh dashboard web application. The indexer aggregates and compiles logs for the dashboard to read. Finally, the manager handles communication between the containers and run manager-specific tasks.
Once the containers are launched, I can open a bash shell inside a container using:
docker exec -it single-node-wazuh.indexer-1 bash
Once inside, I can run various tools inside the containers, such as the password reset tool which I needed to change the default credentials earlier.