cli/command/container/create: pullImage() remove intermediate vars

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-04-11 20:23:11 +02:00
parent e0b47cc2cc
commit a27acd62b3
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 2 additions and 4 deletions

View File

@ -131,12 +131,10 @@ func pullImage(ctx context.Context, dockerCli command.Cli, image string, platfor
return err
}
options := types.ImageCreateOptions{
responseBody, err := dockerCli.Client().ImageCreate(ctx, image, types.ImageCreateOptions{
RegistryAuth: encodedAuth,
Platform: platform,
}
responseBody, err := dockerCli.Client().ImageCreate(ctx, image, options)
})
if err != nil {
return err
}