Skip to content

Commit

Permalink
Merge pull request #41301 from wangyumu/fix-buildkit-pull-nil-panic
Browse files Browse the repository at this point in the history
fix buildkit nil panic when frontend image exists
  • Loading branch information
thaJeztah committed Jul 31, 2020
2 parents e6c4597 + 2b22a2e commit 3969120
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builder/builder-next/adapters/containerimage/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt llb.Re
case source.ResolveModePreferLocal:
img, err := is.resolveLocal(ref)
if err == nil {
if !platformMatches(img, opt.Platform) {
if opt.Platform != nil && !platformMatches(img, opt.Platform) {
logrus.WithField("ref", ref).Debugf("Requested build platform %s does not match local image platform %s, checking remote",
path.Join(opt.Platform.OS, opt.Platform.Architecture, opt.Platform.Variant),
path.Join(img.OS, img.Architecture, img.Variant),
Expand Down

0 comments on commit 3969120

Please sign in to comment.