docker housekeeping: add buildx (#180)
All checks were successful
ansible-lint / Ansible Lint (push) Successful in 44s
ansible-lint / gitleaks (push) Successful in 4s

Reviewed-on: https://git.mgrote.net///mg/homeserver/pulls/180
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2024-09-16 16:42:46 +02:00 committed by Michael Grote
parent 5cd43e8f3d
commit 0b277bf56a
2 changed files with 4 additions and 3 deletions

View file

@ -24,10 +24,11 @@
- name: Enable Units
become: true
ansible.builtin.systemd:
ansible.builtin.systemd_service:
name: "{{ item }}"
enabled: true
masked: false
daemon_reload: true
with_items:
- docker_housekeeping.service
- docker_housekeeping.timer

View file

@ -1,8 +1,8 @@
{{ file_header | default () }}
[Unit]
Description=Docker housekeeping tasks
Description=docker housekeeping tasks
[Service]
Type=simple
ExecStart=/usr/bin/docker system prune --force --filter "until=24h"
ExecStart=/bin/bash -c '/usr/bin/docker system prune --force --filter "until=24h" --all && /usr/bin/docker buildx prune --force --filter "until=24h"'
# https://docs.docker.com/config/pruning