@@ -95,14 +95,14 @@ func newCreateCommand(dockerCLI command.Cli) *cobra.Command {
9595 return cmd
9696}
9797
98- func runCreate (ctx context.Context , dockerCli command.Cli , flags * pflag.FlagSet , options * createOptions , copts * containerOptions ) error {
98+ func runCreate (ctx context.Context , dockerCLI command.Cli , flags * pflag.FlagSet , options * createOptions , copts * containerOptions ) error {
9999 if err := validatePullOpt (options .pull ); err != nil {
100100 return cli.StatusError {
101101 Status : withHelp (err , "create" ).Error (),
102102 StatusCode : 125 ,
103103 }
104104 }
105- proxyConfig := dockerCli .ConfigFile ().ParseProxyConfig (dockerCli .Client ().DaemonHost (), opts .ConvertKVStringsToMapWithNil (copts .env .GetSlice ()))
105+ proxyConfig := dockerCLI .ConfigFile ().ParseProxyConfig (dockerCLI .Client ().DaemonHost (), opts .ConvertKVStringsToMapWithNil (copts .env .GetSlice ()))
106106 newEnv := make ([]string , 0 , len (proxyConfig ))
107107 for k , v := range proxyConfig {
108108 if v == nil {
@@ -112,7 +112,7 @@ func runCreate(ctx context.Context, dockerCli command.Cli, flags *pflag.FlagSet,
112112 }
113113 }
114114 copts .env = * opts .NewListOptsRef (& newEnv , nil )
115- serverInfo , err := dockerCli .Client ().Ping (ctx , client.PingOptions {})
115+ serverInfo , err := dockerCLI .Client ().Ping (ctx , client.PingOptions {})
116116 if err != nil {
117117 return err
118118 }
@@ -124,17 +124,17 @@ func runCreate(ctx context.Context, dockerCli command.Cli, flags *pflag.FlagSet,
124124 StatusCode : 125 ,
125125 }
126126 }
127- id , err := createContainer (ctx , dockerCli , containerCfg , options )
127+ id , err := createContainer (ctx , dockerCLI , containerCfg , options )
128128 if err != nil {
129129 return err
130130 }
131- _ , _ = fmt .Fprintln (dockerCli .Out (), id )
131+ _ , _ = fmt .Fprintln (dockerCLI .Out (), id )
132132 return nil
133133}
134134
135135// FIXME(thaJeztah): this is the only code-path that uses APIClient.ImageCreate. Rewrite this to use the regular "pull" code (or vice-versa).
136- func pullImage (ctx context.Context , dockerCli command.Cli , img string , options * createOptions ) error {
137- encodedAuth , err := command .RetrieveAuthTokenFromImage (dockerCli .ConfigFile (), img )
136+ func pullImage (ctx context.Context , dockerCLI command.Cli , img string , options * createOptions ) error {
137+ encodedAuth , err := command .RetrieveAuthTokenFromImage (dockerCLI .ConfigFile (), img )
138138 if err != nil {
139139 return err
140140 }
@@ -144,7 +144,7 @@ func pullImage(ctx context.Context, dockerCli command.Cli, img string, options *
144144 // Already validated.
145145 ociPlatforms = append (ociPlatforms , platforms .MustParse (options .platform ))
146146 }
147- resp , err := dockerCli .Client ().ImagePull (ctx , img , client.ImagePullOptions {
147+ resp , err := dockerCLI .Client ().ImagePull (ctx , img , client.ImagePullOptions {
148148 RegistryAuth : encodedAuth ,
149149 Platforms : ociPlatforms ,
150150 })
@@ -155,7 +155,7 @@ func pullImage(ctx context.Context, dockerCli command.Cli, img string, options *
155155 _ = resp .Close ()
156156 }()
157157
158- out := dockerCli .Err ()
158+ out := dockerCLI .Err ()
159159 if options .quiet {
160160 out = streams .NewOut (io .Discard )
161161 }
0 commit comments