This repository was archived by the owner on Feb 2, 2021. It is now read-only.
Fixed image exclusion to work with full regular expressions#130
Open
ownaginatious wants to merge 2 commits intospotify:masterfrom
Open
Fixed image exclusion to work with full regular expressions#130ownaginatious wants to merge 2 commits intospotify:masterfrom
ownaginatious wants to merge 2 commits intospotify:masterfrom
Conversation
|
Thank-you @ownaginatious . This has solved my required images getting cleaned up. |
Author
|
No problem 👍 Now if only the maintainers of the repo actually looked at anyone's PRs... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now the image exclusion file (
/etc/docker-gc-exclude) only supports basic regular expressions like so:Syntax involving regular expression symbols like
^or$doesn't work. For example:Although in most cases what's supported is "good enough", it's rather confusing to only partially support typical regex operations. The reason it isn't supported seems to be a limitation of how the matching was done (basically
repo:tag imageidis passed through with either the first or second block of text matching the regex).This PR fixes that so that
repo:tagis matched on its own followed byimageidon its own, and the resulting list of matching image IDs are combined.This is backwards compatible and simply extends the functionality.