+ Docker config to save on space

This commit is contained in:
shockrah 2022-06-13 23:16:30 -07:00
parent 2f926b99c1
commit a61ef4b841
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# Here we basically install a config that limits all containers to having
# a maxium amount of logs on disk. We do this to save on storage space
---
- hosts: alpha
become: yes
tasks:
- name: Copy over daemon.json config
copy:
src: docker/daemon.json
dest: /etc/daemon.json
- name: Restart Docker service
systemd:
name: docker
state: restarted

View File

@ -0,0 +1,7 @@
{
"log-driver" : "local",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}