Created
October 10, 2018 02:04
-
-
Save oazabir/b413dd838f392fdd82c1e449ab5df0bd to your computer and use it in GitHub Desktop.
Docker log rotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit the daemon configuration file: | |
``` | |
$ vim /etc/docker/daemon.json | |
``` | |
Add the following lines to file: | |
``` | |
{ | |
"log-driver": "json-file", | |
"log-opts": { | |
"max-size": "10m", | |
"max-file": "3" | |
} | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment