Skip to content

Conversation

@brownag
Copy link
Owner

@brownag brownag commented Dec 14, 2025

This pull request introduces automated cleanup processes for Docker images, both locally and in the GitHub Container Registry (GHCR), to help manage disk usage and keep only the most recent images. It adds scripts for local and remote cleanup, a new GitHub Actions workflow for GHCR cleanup, and updates the documentation to explain these maintenance tools.

  • Added scripts/cleanup-local-docker-images.sh, a script to clean up old local Docker images, keeping only the latest base and runtime images. Supports dry-run and force options for safety.
  • Added scripts/cleanup-ghcr-images.sh, a script for removing older images from GHCR using the GitHub CLI, with options for dry-run, force, and controlling the number of versions to keep.
  • Added .github/workflows/cleanup-ghcr.yml, a GitHub Actions workflow to automate GHCR image cleanup, supporting manual triggers and configurable options for safe deletion.
  • Expanded CONTRIBUTING.md with a new section on Docker image maintenance, detailing how to use the cleanup scripts and workflow, their options, and the retention policy for images.

@brownag brownag merged commit 199ea95 into main Dec 14, 2025
4 checks passed
@brownag brownag deleted the docker-cleanup1 branch December 15, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants