Browse code

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>

Paweł Gronowski authored on 2025/05/21 19:48:44
Showing 1 changed files
... ...
@@ -78,7 +78,7 @@ func (daemon *Daemon) containerCreate(ctx context.Context, daemonCfg *configStor
78 78
 	}
79 79
 
80 80
 	if opts.params.Platform == nil && opts.params.Config.Image != "" {
81
-		img, err := daemon.imageService.GetImage(ctx, opts.params.Config.Image, backend.GetImageOpts{Platform: opts.params.Platform})
81
+		img, err := daemon.imageService.GetImage(ctx, opts.params.Config.Image, backend.GetImageOpts{})
82 82
 		if err != nil {
83 83
 			return containertypes.CreateResponse{}, err
84 84
 		}