Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Critical
-
Resolution: Duplicate
-
Affects Version/s: 3.0.0, 3.1.0, 3.2.0
-
Fix Version/s: None
-
Component/s: Docker, Scheduled Tasks
-
Labels:None
-
Epic Link:
Description
Overview
Add a scheduled task to delete Docker images older than a certain number of days. Optionally allow names to be specified as a regular expression.
Justification
Nexus used in a CI/CD context often results in a new image built, tagged and pushed on every build. This quickly exhausts disk space, unless manual steps are taken. This can make Nexus unusable in an automated build pipeline.
For users with this use case, see these comments:
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=334295&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-334295
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=373289&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-373289
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=373289&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-373289
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=378419&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-378419
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=378685&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-378685
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=378950&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-378950
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=378973&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-378973
- https://issues.sonatype.org/browse/NEXUS-9293?focusedCommentId=382302&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-382302
Alternatives
- Manual clear-out scripts; brittle and implementation-specific
- Use massive amounts of storage (e.g. S3); obviously not a viable long-term solution
Background
This ticket was raised following this comment on NEXUS-9293:
Nexus Repository Manager 3.2 will have a new scheduled task "Purge unused docker manifests and images" which will remove any manifest that isn't associated with a tag and any image that isn't associated with a tagged manifest.
This task does not encompass cleaning out images by a certain number of days which was mentioned in one of the comments as we consider that a seperate implementation effort from the described feature here.
Thanks for your patience.
Attachments
Issue Links
- duplicates
-
NEXUS-11435 Ability to clean up old docker images/layers from hosted repository
-
- Done
-
- is related to
-
NEXUS-9293 add a task to purge dangling docker images
-
- Closed
-