Browse Source

runner: add a docker prune crojob

old images tend to pile up, so we need to schedule a garbage collection.
master
Devan Carpenter 2 weeks ago
parent
commit
b65f268a7f
Signed by: dvn GPG Key ID: E1707CFFD7B85A02
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      roles/gitlab-runner/tasks/main.yml

+ 7
- 0
roles/gitlab-runner/tasks/main.yml View File

@ -83,3 +83,10 @@
with_items:
- gitlab-runner
when: ansible_local.gitlab_runner.executor == "docker"
- name: Install Docker garbage collection cronjob
cron:
user: "gitlab-runner"
name: "Docker GC"
hour: "3"
job: "docker system prune -f && docker system prune -f --volumes"

Loading…
Cancel
Save