February 8, 20251 yr Hi all, Hard one to explain. I've jumped into the unraid console to delete a .log file from a Docker container that is causing me issues. When I navigate out to /var/lib/docker/volumes and hit LS to find the right name I get all names in Hex Numbers. Any solutions?
February 9, 20251 yr Community Expert ... docker logs are there container ID which is the /var/lib/docker/containers/<docker container ID>/ <docker container ID>-json.log for example: UNraid web UI My Clam AV container ID is: Container ID: bc85211994ba (If running) docker ps: I run this script to kill all docker logs: #!/bin/bash # Define the directory where Docker container logs are stored LOG_DIR="/var/lib/docker/containers" # List and calculate the size of the log files in the container directory, filter out directories and sort by size echo "Listing top 10 largest Docker log files:" du -ah $LOG_DIR | grep -v "/$" | grep ".log" | sort -rh | head -10 # Automatically proceed with cleanup without prompt echo "Proceeding with log file cleanup..." du -ah $LOG_DIR | grep -v "/$" | grep ".log" | sort -rh | head -10 | while read -r size file; do echo "Truncating $file..." cat /dev/null > "$file" done echo "Log cleanup completed." so my clam AV container is in: bc85211994ba74edeb3bc5f03c411b1e37ed87db14e0feaef80cfdbf0b8266c5 (as the docker command and unraid web UI will not display the entire string!) here the container ID - json.log is the log file that the unraid web UI that unraid reads from the docker tab... That has been there since the original creation of unirad and how docekr manges stuff. even in the docker inspect commands it will use the container ID not the name... Names are assigned and added later to make them Human readable. You are looking at the "volumes" location and should be looking at the containers location...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.