daemon/create: Simplify GetImage args

`opts.params.Platform` is always nil inside this branch so we can omit
it from the `GetImage` call to make it less confusing.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2025-05-21 12:48:44 +02:00
parent fbe2330989
commit a2ada6b258

View File

@@ -78,7 +78,7 @@ func (daemon *Daemon) containerCreate(ctx context.Context, daemonCfg *configStor
}
if opts.params.Platform == nil && opts.params.Config.Image != "" {
img, err := daemon.imageService.GetImage(ctx, opts.params.Config.Image, backend.GetImageOpts{Platform: opts.params.Platform})
img, err := daemon.imageService.GetImage(ctx, opts.params.Config.Image, backend.GetImageOpts{})
if err != nil {
return containertypes.CreateResponse{}, err
}