Skip to content

Commit c7c2f0e

Browse files
committed
Initialize build args from stage base
Signed-off-by: Talon Bowler <[email protected]>
1 parent ae8f60b commit c7c2f0e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

frontend/dockerfile/dockerfile2llb/convert.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ func (ds *dispatchState) init() {
10341034
// the paths we use back to the base image.
10351035
ds.paths = ds.base.paths
10361036
ds.workdirSet = ds.base.workdirSet
1037+
ds.buildArgs = append(ds.buildArgs, ds.base.buildArgs...)
10371038
}
10381039

10391040
type dispatchStates struct {
@@ -2210,9 +2211,7 @@ func reportUnmatchedVariables(cmd instructions.Command, buildArgs []instructions
22102211
return
22112212
}
22122213
for _, buildArg := range buildArgs {
2213-
if buildArg.Value != nil {
2214-
delete(unmatched, buildArg.Key)
2215-
}
2214+
delete(unmatched, buildArg.Key)
22162215
}
22172216
if len(unmatched) == 0 {
22182217
return

0 commit comments

Comments
 (0)