testcontainers / testcontainers-dotnet

A library to support tests with throwaway instances of Docker containers for all compatible .NET Standard versions.
https://dotnet.testcontainers.org
MIT License
3.65k stars 250 forks source link

fix: Prevent .dockerignore entry from matching everything if it ends with globstart #1122

Closed HofmeisterAn closed 4 months ago

HofmeisterAn commented 4 months ago

What does this PR do?

The PR changes the .dockerignore partial (directory or file path) match implementation. The previous implementation contained a bug that resulted in creating a regular expression matching everything if a .dockerignore entry or line ended with /**, such as !.git/refs/heads/**.

Why is it important?

Developers could encounter issues where the .dockerignore entry either ignored too many directories or files, or the negate pattern accepted too many directories or files that should have been ignored.

Related issues

netlify[bot] commented 4 months ago

Deploy Preview for testcontainers-dotnet ready!

Name Link
Latest commit 1202c4ead393b10a4878b789d6820f8efb1b08fd
Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/65d3915bcff71d0008096c3f
Deploy Preview https://deploy-preview-1122--testcontainers-dotnet.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.