Skip to content

Instantly share code, notes, and snippets.

@oazabir
Created October 10, 2018 02:04
Show Gist options
  • 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