Skip to content

Instantly share code, notes, and snippets.

@oazabir
Created October 10, 2018 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oazabir/b413dd838f392fdd82c1e449ab5df0bd to your computer and use it in GitHub Desktop.
Save oazabir/b413dd838f392fdd82c1e449ab5df0bd to your computer and use it in GitHub Desktop.
Docker log rotation
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