mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix buildkit pull nil panic
Signed-off-by: Wang Yumu <37442693@qq.com>
This commit is contained in:
parent
9e33baffc5
commit
2b22a2e792
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue