runner: add a docker prune crojob

old images tend to pile up, so we need to schedule a garbage collection.
master
Devan Carpenter 2 years ago
parent 6b1df92895
commit b65f268a7f
Signed by: dvn
GPG Key ID: E1707CFFD7B85A02
  1. 7
      roles/gitlab-runner/tasks/main.yml

@ -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