What's the best approach to push images to Nexus registery

Hello, I m new to this community! and Hope to get some feedback orientations on the following scenario.
I have an existing pipeline that is creating/pushing a docker image in nexus-registry that contain a jar file. every time I run the pipeline an Image tagged with " :1.0.0-SNAPSHOT.<git_comit_code> " is created.
that’s make the manifest folder in the repo growing indefinitely.

  • Is there a way to only deploy one image or automatically delete the previous images ?
  • What do you recommend for me as best practices in this subject? (pipeline , docker, tags)
    Thank you.

If you go to the administration cog and click “Cleanup Policies” You can create a rule for docker images that cleans up old images automatically based on age, usage, or naming conventions. This might help correct your issue. You can also test it against your registry via the “preview” pane at the bottom of the cleanup rules to show what images it would delete if you enabled it. I highly recommend you utilize the preview before enabling any automated cleanup.

1 Like