Docker Registry Cleaner and Metadata Generator
detail.loadingPreview
Automates Docker registry cleanup by removing old tags and generates structured metadata for images.
About This Workflow
This n8n workflow automates the management of your Docker registry by implementing a tag retention policy and performing cleanup operations. It regularly scans your registry, identifies images with outdated tags beyond a defined threshold, and removes them. Additionally, it fetches manifest data, providing structured metadata for your images.
Key Features
- Automated Tag Retention: Automatically keeps a configurable number of the latest tags for each image, plus the 'latest' tag if present.
- Old Tag Removal: Deletes tags that exceed the retention policy.
- Manifest Metadata Extraction: Fetches
docker-content-digestand other relevant manifest information. - Garbage Collection Trigger: Initiates Docker registry garbage collection after cleanup to reclaim space.
- Scheduled Execution: Runs automatically on a predefined schedule (e.g., daily at 1 AM).
- Notification System: Sends email notifications for successful tag removals and any failures encountered during the process.
How To Use
- Configure Registry URL and Credentials: Update the
<<your-registry-url>>placeholder in thehttpRequestnodes with your Docker registry's base URL. Configure your Docker registry credentials using thegenericCredentialType(httpBasicAuth). - Set Email Notifications: In the
Send Notification EmailandSend Failure Notification Emailnodes, updatetoEmailandfromEmailwith your desired email addresses. - Adjust Tag Retention Policy: The
Identify Tags to Removenode is configured to keep the latest 10 tags plus 'latest'. Modify thesortedTags.slice(0, 10)andif (latestTag) keepTags.push('latest');logic within thejsCodeto adjust this retention policy. - Schedule Trigger: Configure the
Scheduled Triggernode to run the workflow at your preferred interval. The current configuration is set to run daily at 1 AM. - Review and Execute: Save the workflow and execute it. Monitor the execution logs for successful runs or errors.
Apps Used
Workflow JSON
{
"id": "05c26f6b-2a45-4a42-b735-ba2edfcb02a8",
"name": "Docker Registry Cleaner and Metadata Generator",
"nodes": 24,
"category": "Registry Management",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 05c26f6b-2a45...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Automate Local Business Outreach with AI-Powered Yelp Scraper
This workflow automates the process of scraping local business details from Yelp using AI, then leverages that data to send personalized partnership proposals via Gmail. It's perfect for sales and marketing teams looking to streamline lead generation and outreach campaigns.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.