Skip to main content
In this demo, you’ll learn how to turn on Docker daemon debug mode, verify that it’s active, and inspect verbose logs during container operations.

1. Check Current Debug Status

Start by viewing your Docker daemon’s current settings:
Look for the Debug Mode line in the output:

2. Create a Test Container & Inspect Default Logs

Launch a simple HTTPD container:
Then review your system log (e.g., /var/log/messages or journalctl -u docker.service). You should only see high-level entries about container creation:

3. Enable Docker Debug Mode

To capture detailed debug output, edit the Docker daemon configuration:
  1. Open /etc/docker/daemon.json (create it if missing) and add:
If the file doesn’t exist, you can create it. Make sure the JSON remains valid—use a JSON linter if needed.
  1. Reload the Docker daemon:

4. Confirm Debug Mode Is Active

Run the inspect command again:
Now you should see Debug Mode: true along with extra metrics:

5. Generate and View Verbose Logs

Create a new container called test_debug:
Then tail your logs to see debug-level details:
You’ll notice granular messages describing each step of the container lifecycle.

6. Reload Docker with SIGHUP & Disable Debug

If you prefer a manual reload instead of systemctl:
  1. Update /etc/docker/daemon.json to disable debug mode:
  2. Identify the Docker daemon PID and send SIGHUP:
Always verify you have the correct PID before sending signals. Killing the wrong process can disrupt your system.
  1. Check that debug is now off:

Command Reference


Watch Video