--log-opt max-size does not limit non-breaking log output #25930
Labels
area/logging
kind/enhancement
Enhancements are not bugs or new features but can improve usability or performance.
version/1.12
Milestone
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
VirtualBox created using docker-machine
Using default JSON log driver.
Steps to reproduce the issue:
docker run --name badguy --log-opt max-size=1k --log-opt max-file=2 -d ubuntu sh -c "while true; do printf A; done"
docker kill badguy
Describe the results you received:
/var/lib/docker/containers/<id>
--log-opt max-size=1k
Describe the results you expected:
--log-opt max-size=1k
Additional information you deem important (e.g. issue happens only occasionally):
The logs do get rotated if there is a line break in the log. e.g. if you replace
printf
withecho
you get expected behaviour.This is a potential security problem with misbehaving docker containers filling the host disk using huge single-line log statements.
The text was updated successfully, but these errors were encountered: