-
Notifications
You must be signed in to change notification settings - Fork 18.8k
builder: implement PullParent option with buildkit #37613
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,6 +209,12 @@ func (b *Builder) Build(ctx context.Context, opt backend.BuildConfig) (*builder. | |
frontendAttrs["no-cache"] = "" | ||
} | ||
|
||
if opt.Options.PullParent { | ||
frontendAttrs["image-resolve-mode"] = "pull" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thinking if it would be good to use the values that are / will be defined in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thaJeztah actually, could do it in a follow up once buildkit has a String() method on it. I don't want to rely on llb package at this level of abstraction. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup; definitely not a blocker (same for my other comment) 👍 |
||
} else { | ||
frontendAttrs["image-resolve-mode"] = "default" | ||
} | ||
|
||
if opt.Options.Platform != "" { | ||
// same as in newBuilder in builder/dockerfile.builder.go | ||
// TODO: remove once opt.Options.Platform is of type specs.Platform | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; could be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thaJeztah true, this was because the original (desired) code is the one commented out below in which case the assignments do make sense.