docker prune all images but keep images downloaded or created less than 48 hours ago

0 votes
Problem we're trying to overcome: We'd like to reduce pulling from JFrog on our Bamboo agents as sometimes the same docker images may be pulled multiple times over the course of a pipeline. We'd like to reduce pulls by keeping them on the build agents for upto 48 hours, by which point, they'll be redundant anyway.

I've tried docker image prune --force --all --filter "until=48h" however it seems to delete images that were "created" over 48 hours ago. i.e. if I pull an image from dockerhub that was created over two days ago, postgres for example, it'll delete that one as well, despite it existing on my server for less that an hour.
Apr 13, 2023 in DevOps & Agile by anish
• 400 points

edited 4 days ago 7 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP