Skip to content

GitLab Next

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,407
    • Issues 2,407
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #27332
Closed
Open
Created Dec 22, 2020 by Cody West@codyDeveloper

Smart cache cleanup for Docker images & volumes

Description

It has been pointed out in several issues and tickets that users and customers are running out of disk space on their Runner hosts because the caching for the GitLab Runner seems to continue to consume disk space until an admin manually intervenes.

Currently we have a small documentation section that suggests running the clear-docker-cache script included with the runner on a weekly cron.

But this script only cleans up images, not volumes. And it clears up images indiscriminately. Which means that builds will be slower for a while until caches for most-used resources are rebuilt. Ideally we would only evict the least recently used resources.

I found another tool here: GitLab.org / gitlab-runner-docker-cleanup. But it isn't being maintained.

Proposal

A smart cache cleanup mechanism included in the Runner.

Links to related issues and merge requests / references

GitLab Runner doesn't automatically clean up containers after it completes using them and exits

Prevent Gitlab-runner from leaving dead containers/volumes

Assignee
Assign to
Time tracking