vendor: update buildkit to 3e38a2d

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-04-03 20:40:33 +02:00
parent c3db06cda0
commit a49ad031a5
87 changed files with 2964 additions and 4427 deletions

View File

@ -230,13 +230,7 @@ func (s State) WithOutput(o Output) State {
}
func (s State) WithImageConfig(c []byte) (State, error) {
var img struct {
Config struct {
Env []string `json:"Env,omitempty"`
WorkingDir string `json:"WorkingDir,omitempty"`
User string `json:"User,omitempty"`
} `json:"config,omitempty"`
}
var img ocispecs.Image
if err := json.Unmarshal(c, &img); err != nil {
return State{}, err
}
@ -251,6 +245,13 @@ func (s State) WithImageConfig(c []byte) (State, error) {
}
}
s = s.Dir(img.Config.WorkingDir)
if img.Architecture != "" && img.OS != "" {
s = s.Platform(ocispecs.Platform{
OS: img.OS,
Architecture: img.Architecture,
Variant: img.Variant,
})
}
return s, nil
}