Skip to content

Commit 3d789eb

Browse files
authored
Merge pull request moby#4987 from tonistiigi/df-base-verify-reachable
dockerfile: make sure stage is reachable before validating base
2 parents 03d2f9f + 7bd09be commit 3d789eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/dockerfile/dockerfile2llb/convert.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,9 @@ func toDispatchState(ctx context.Context, dt []byte, opt ConvertOpt) (*dispatchS
601601
llb.WithCustomName(prefixCommand(d, "FROM "+d.stage.BaseName, opt.MultiPlatformRequested, platform, nil)),
602602
location(opt.SourceMap, d.stage.Location),
603603
)
604-
validateBaseImagePlatform(origName, *platform, d.image.Platform, d.stage.Location, lint)
604+
if reachable {
605+
validateBaseImagePlatform(origName, *platform, d.image.Platform, d.stage.Location, lint)
606+
}
605607
}
606608
d.platform = platform
607609
return nil

0 commit comments

Comments
 (0)