![]() ![]() # cat /dev/null > /var/lib/docker/containers/CONTAINER_ID/CONTAINER_ID-json.log If there is already a log file already present on the host that needs to be removed, run the following to clear its contents and reduce its size. Restart docker service for the changes to take effect.OPTIONS='-insecure-registry=172.30.0.0/16 -signature-verification=false -selinux-enabled -log-opt max-size=50m -log-opt max-file=5' To set log limits for containers on a host -log-opt can be configured with max-size and max-file so that a containers logs are rolled over when they reach a max limit and only a certain number of files are saved before being discarded.See Docker Logging Documentation for more information on what can be set. A log file can grow so large that it fills up the disk space if the container runs for long enough and generate enough logs. ![]() Container logs by default are not configured to be rotated or limited to a max size by docker.With OpenShift 3 I am seeing that docker is filling up space on /var/lib/docker.Running docker info shows plenty of data space available but my root file system is filling up with most space taken up in /var/lib/docker.Docker is configured to use a thin pool logical volume for storage but is still filling up /var/lib/docker.How do I set log limits for container logs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |