@@ -121,7 +121,7 @@ func runRun(dockerCli command.Cli, flags *pflag.FlagSet, ropts *runOptions, copt
121121func runContainer (dockerCli command.Cli , opts * runOptions , copts * containerOptions , containerCfg * containerConfig ) error {
122122 config := containerCfg .Config
123123 stdout , stderr := dockerCli .Out (), dockerCli .Err ()
124- client := dockerCli .Client ()
124+ apiClient := dockerCli .Client ()
125125
126126 config .ArgsEscaped = false
127127
@@ -150,7 +150,7 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
150150 }
151151 if opts .sigProxy {
152152 sigc := notifyAllSignals ()
153- go ForwardAllSignals (ctx , dockerCli , containerID , sigc )
153+ go ForwardAllSignals (ctx , apiClient , containerID , sigc )
154154 defer signal .StopCatch (sigc )
155155 }
156156
@@ -186,10 +186,10 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
186186 defer closeFn ()
187187 }
188188
189- statusChan := waitExitOrRemoved (ctx , dockerCli . Client () , containerID , copts .autoRemove )
189+ statusChan := waitExitOrRemoved (ctx , apiClient , containerID , copts .autoRemove )
190190
191191 // start the container
192- if err := client .ContainerStart (ctx , containerID , container.StartOptions {}); err != nil {
192+ if err := apiClient .ContainerStart (ctx , containerID , container.StartOptions {}); err != nil {
193193 // If we have hijackedIOStreamer, we should notify
194194 // hijackedIOStreamer we are going to exit and wait
195195 // to avoid the terminal are not restored.
0 commit comments