diff --git a/cli/command/container/create.go b/cli/command/container/create.go index 1a48c69f15..05ac2fe0e0 100644 --- a/cli/command/container/create.go +++ b/cli/command/container/create.go @@ -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 }