Docker Community Forums

Share and learn in the Docker community.

Disk full due to docker logs

beta
docker

(Aelamrani) #1

Expected behavior

Actual behavior

I 've got more than 400 Go of logs :hushed: :

~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/log

-rw-r–r-- 1 azize staff 70M 26 mai 23:54 acpid.log
-rw-r–r-- 1 azize staff 5,6G 26 mai 23:55 dmesg
-rw------- 1 azize staff 103G 27 mai 00:08 docker.log
-rw-r–r-- 1 azize staff 75K 27 mai 00:08 messages
-rw-r–r-- 1 azize staff 804K 26 mai 14:15 messages.0
-rw-r–r-- 1 azize staff 187K 26 mai 14:30 proxy-vsockd.log
-rw-r–r-- 1 azize staff 244G 26 mai 14:30 vsudd.log
-rw-r–r-- 1 azize staff 0B 26 avr 14:14 wtmp

Information

OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta13
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160527-003656.tar.gz
Most specific failure is: No error was detected
Your unique id is: 7EFD0137-9EEA-496A-BE62-DB1C9C851B60
Please quote this in all correspondence.

Steps to reproduce the behavior

Just run docker all day long…


Docker eats up all available harddisk space
(Alexandre) #2

Hi and welcome to Docker forums!

This thread discuss the same issue:


*Note: I previously linked to another thread that I mistakenly though was related, but was not.

If so, please add your info in that thread so that the Docker staff can track the issue from one place.

HTH,
Alexandre


(Zhongdj) #3

Hey Guys,

I met the same issue, it is mainly the log files allocate too much space.

Can i remove all those log files? And is there a way to control the log rotation and file size?


(Alexandre) #4

Yeah, logs can be safely deleted (as a precaution, I turn Docker off before doing so).


(Luis Herrera) #5

Here´s a potential work-around. Create a daemon.json file with the contents below: it will limit the size of the log file (and also make them less verbose…)

$ pinata set daemon @daemon.json
daemon.json -> {“log-driver”:“json-file”,“log-opt”:[{“max-size”:“2m”},{“max-file”:“5”}],“log-level”:“info”}
$ pinata restart