docker housekeeping: add buildx (#180)
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:
parent
5cd43e8f3d
commit
0b277bf56a
2 changed files with 4 additions and 3 deletions
|
@ -24,10 +24,11 @@
|
||||||
|
|
||||||
- name: Enable Units
|
- name: Enable Units
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd_service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
enabled: true
|
enabled: true
|
||||||
masked: false
|
masked: false
|
||||||
|
daemon_reload: true
|
||||||
with_items:
|
with_items:
|
||||||
- docker_housekeeping.service
|
- docker_housekeeping.service
|
||||||
- docker_housekeeping.timer
|
- docker_housekeeping.timer
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{{ file_header | default () }}
|
{{ file_header | default () }}
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Docker housekeeping tasks
|
Description=docker housekeeping tasks
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
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
|
# https://docs.docker.com/config/pruning
|
||||||
|
|
Loading…
Reference in a new issue