Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

I've been using Nexus to publish my Docker images for a couple of months and I really like the features it adds to a classic Docker Registry.

Recently, the number of images we're storing caused disk space issues. I looked around the graphical interface and there's apparently nothing to remove several Docker images at the same time. I know there's a Nexus task to remove unused artifacts but it seems to work only for Maven and Nugget.

Is there a way with Nexus Repository Manager OSS 3.0.1-01 to remove unused images or at least several images at the same time?

Thanks!

1 Answer

0 votes
by (50.2k points)

Yes to clean up old container images periodically you need to set up two tasks

Cleanup container images

Compact blob store.

First is to delete but this does not complete enough to clean up so you need to follow the second step also by below steps

Log in to nexus repo ->settings -> Repository ->Clean up Policies ->Create Clean up Policy

Provide a name, Set format as docker Specify criteria. Click Create

Select Repository -> Repositories ->

In The Cleanup Policy select your recently created clean up policy

Save

Select Tasks from Administrations tab

You will see a task

Select Create Task -> Compact Blob Store ->Select the default blob store and specify your clean up schedule.

This together will help you to clean up the repository and cleans the unused docker images.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...