Skip to content

Commit

Permalink
Do not export an empty to path to a windows image config
Browse files Browse the repository at this point in the history
  • Loading branch information
mendsley committed Jul 26, 2024
1 parent 3d0ff01 commit 7ee26b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/dockerfile/dockerfile2llb/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ func toDispatchState(ctx context.Context, dt []byte, opt ConvertOpt) (*dispatchS
if d.platform != nil {
osName = d.platform.OS
}
d.image.Config.Env = append(d.image.Config.Env, "PATH="+system.DefaultPathEnv(osName))
if p := system.DefaultPathEnv(osName); p != "" {
d.image.Config.Env = append(d.image.Config.Env, "PATH="+p)
}
}

// initialize base metadata from image conf
Expand Down

0 comments on commit 7ee26b8

Please sign in to comment.