@@ -95,16 +95,16 @@ func runCreate(dockerCli command.Cli, flags *pflag.FlagSet, options *createOptio
9595 }
9696 }
9797 copts .env = * opts .NewListOptsRef (& newEnv , nil )
98- containerConfig , err := parse (flags , copts , dockerCli .ServerInfo ().OSType )
98+ containerCfg , err := parse (flags , copts , dockerCli .ServerInfo ().OSType )
9999 if err != nil {
100100 reportError (dockerCli .Err (), "create" , err .Error (), true )
101101 return cli.StatusError {StatusCode : 125 }
102102 }
103- if err = validateAPIVersion (containerConfig , dockerCli .Client ().ClientVersion ()); err != nil {
103+ if err = validateAPIVersion (containerCfg , dockerCli .Client ().ClientVersion ()); err != nil {
104104 reportError (dockerCli .Err (), "create" , err .Error (), true )
105105 return cli.StatusError {StatusCode : 125 }
106106 }
107- response , err := createContainer (context .Background (), dockerCli , containerConfig , options )
107+ response , err := createContainer (context .Background (), dockerCli , containerCfg , options )
108108 if err != nil {
109109 return err
110110 }
@@ -199,10 +199,10 @@ func newCIDFile(path string) (*cidFile, error) {
199199}
200200
201201//nolint:gocyclo
202- func createContainer (ctx context.Context , dockerCli command.Cli , containerConfig * containerConfig , opts * createOptions ) (* container.CreateResponse , error ) {
203- config := containerConfig .Config
204- hostConfig := containerConfig .HostConfig
205- networkingConfig := containerConfig .NetworkingConfig
202+ func createContainer (ctx context.Context , dockerCli command.Cli , containerCfg * containerConfig , opts * createOptions ) (* container.CreateResponse , error ) {
203+ config := containerCfg .Config
204+ hostConfig := containerCfg .HostConfig
205+ networkingConfig := containerCfg .NetworkingConfig
206206
207207 warnOnOomKillDisable (* hostConfig , dockerCli .Err ())
208208 warnOnLocalhostDNS (* hostConfig , dockerCli .Err ())
@@ -293,8 +293,8 @@ func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig
293293 }
294294 }
295295
296- for _ , warning := range response .Warnings {
297- fmt .Fprintf (dockerCli .Err (), "WARNING: %s\n " , warning )
296+ for _ , w := range response .Warnings {
297+ fmt .Fprintf (dockerCli .Err (), "WARNING: %s\n " , w )
298298 }
299299 err = containerIDFile .Write (response .ID )
300300 return & response , err
0 commit comments