Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Brick prune #22

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Brick prune #22

merged 1 commit into from
Feb 18, 2020

Conversation

corradio
Copy link
Member

@corradio corradio commented Feb 18, 2020

Fixes #19

  • adds a brick prune command which removes images that are NOT tagged as master or latest, and that are more than 3 days old. Note that no-op builds update the tag date. This effectively means we delete builds from branches that are > 3 days old.
  • also works recursively using brick -r prune
    image

cc @robertahunt FYI

@madsnedergaard
Copy link
Member

Looks good to me, is there a reason for not using the built-in pruning feature in Docker?

@corradio
Copy link
Member Author

corradio commented Feb 18, 2020 via email

@madsnedergaard
Copy link
Member

madsnedergaard commented Feb 18, 2020

It should be possible to do a label !=xx filtering as far as I can tell :)

https://docs.docker.com/engine/reference/commandline/image_prune/#filtering

@corradio
Copy link
Member Author

corradio commented Feb 18, 2020 via email

Copy link
Member

@madsnedergaard madsnedergaard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my mistake - LGTM then :)

@corradio corradio merged commit ccadb81 into master Feb 18, 2020
@corradio corradio deleted the olc/brick-prune branch February 18, 2020 09:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brick prune
2 participants