Skip to content

Fix .containerignore patterns with leading/trailing slashes#28430

Merged
TomSweeneyRedHat merged 1 commit intocontainers:mainfrom
Honny1:fix-containerignore
Apr 3, 2026
Merged

Fix .containerignore patterns with leading/trailing slashes#28430
TomSweeneyRedHat merged 1 commit intocontainers:mainfrom
Honny1:fix-containerignore

Conversation

@Honny1
Copy link
Copy Markdown
Member

@Honny1 Honny1 commented Apr 1, 2026

I checked this with AI. It seems that localbuild takes a different path in the remote environment, causing ignored files to be copied to the server. This issue was largely resolved on Windows and macOS with the recent localapi improvements. However, pure remote builds were still affected. For example, when ignored files were large and ended up being copied to the remote server (not image).

Fixes: #25458

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Fixed .containerignore/.dockerignore patterns with leading or trailing slashes being silently ignored during remote builds

Fixes: containers#25458

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
@Honny1 Honny1 marked this pull request as ready for review April 2, 2026 08:23
@mheon
Copy link
Copy Markdown
Member

mheon commented Apr 2, 2026

LGTM

1 similar comment
@TomSweeneyRedHat
Copy link
Copy Markdown
Member

LGTM

@TomSweeneyRedHat
Copy link
Copy Markdown
Member

/lgtm

@TomSweeneyRedHat TomSweeneyRedHat merged commit 12c6562 into containers:main Apr 3, 2026
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leading slashes in container ignorefile don't match as expected

3 participants