Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow none differ on local source to avoid false Dockerfile matches #2081

Merged
merged 3 commits into from
Jul 1, 2021

Conversation

tonistiigi
Copy link
Member

fixes #1368

Allows new llb.Differ property to configure what algorithm should be used when transferring file changes. Dockerfile frontend is updated to not trust metadata comparison for Dockerfile/dockerignore transfer. This can be extended in the future with some content-based comparison for better precision.

@thaJeztah
Copy link
Member

@tonistiigi needs a rebase

@thaJeztah
Copy link
Member

@AkihiroSuda @crazy-max ptal

@thaJeztah
Copy link
Member

(also would this one be ok to backport?)

@tonistiigi tonistiigi force-pushed the local-differ-none branch from a552209 to 31b38d1 Compare May 13, 2021 05:49
@tonistiigi tonistiigi force-pushed the local-differ-none branch from 31b38d1 to f9e9be0 Compare June 3, 2021 06:14
@tonistiigi tonistiigi requested review from hinshun and AkihiroSuda June 3, 2021 07:49
@tonistiigi tonistiigi added this to the v0.9.0 milestone Jun 11, 2021
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
Copy link
Member Author

@AkihiroSuda @coryb

Copy link
Collaborator

@coryb coryb left a comment

Choose a reason for hiding this comment

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

LGTM, would generally prefer comments to describe intent of code as we expand the functionality.

client/llb/source.go Outdated Show resolved Hide resolved
This avoids wrong metadata matches on small files

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi requested a review from coryb June 30, 2021 23:49
Copy link
Collaborator

@coryb coryb left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the update

@AkihiroSuda AkihiroSuda merged commit be8ab28 into moby:master Jul 1, 2021
@thaJeztah
Copy link
Member

(also would this one be ok to backport?)

👆 any ideas on that? How risky is this change to backport? (too risky?)

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.

Wrong dockerfile used when building two images in the same context folder
4 participants