COPY --exclude: make patterns context relative#6729
Open
Honny1 wants to merge 1 commit intocontainers:mainfrom
Open
COPY --exclude: make patterns context relative#6729Honny1 wants to merge 1 commit intocontainers:mainfrom
Honny1 wants to merge 1 commit intocontainers:mainfrom
Conversation
Fixes: containers#6726 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
abitrolly
reviewed
Mar 14, 2026
| "COPY --exclude=storage/views app/ app/", | ||
| }, "\n"), | ||
| contextDir: "dockerignore/exclude_subdir_under_source", | ||
| fsSkip: []string{"(dir):app:mtime", "(dir):app:(dir):storage:mtime", "(dir):app:(dir):storage:(dir):cache:mtime"}, |
There was a problem hiding this comment.
What does fsSkip mean? Is it possible to replace it with human readable ls -la like output?
Member
Author
There was a problem hiding this comment.
It skips specific file attributes or files when comparing container images. The conformance tests evaluate the differences between image builders, such as Buildah and Docker, by comparing the images they generate. In this case, it ignores the file mtime because those images might have been built at different times.
There was a problem hiding this comment.
Is there a reason to keep it array instead of multiline string? The array syntax is hard to read.
If fsSkip is for masking attributes and files, where is the place where comparison of unmasked content is being done?
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prepend each copy source to each exclude so source relative patterns match.
Fixes: #6726
What type of PR is this?
/kind bug
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?