@@ -18,7 +18,6 @@ import (
18
18
"github.com/docker/docker/pkg/pools"
19
19
"github.com/docker/docker/pkg/signal"
20
20
"github.com/docker/docker/pkg/term"
21
- "github.com/docker/docker/utils"
22
21
)
23
22
24
23
// Seconds to wait after sending TERM before trying KILL
@@ -94,7 +93,7 @@ func (d *Daemon) getActiveContainer(name string) (*container.Container, error) {
94
93
95
94
// ContainerExecCreate sets up an exec in a running container.
96
95
func (d * Daemon ) ContainerExecCreate (name string , config * types.ExecConfig ) (string , error ) {
97
- container , err := d .getActiveContainer (name )
96
+ cntr , err := d .getActiveContainer (name )
98
97
if err != nil {
99
98
return "" , err
100
99
}
@@ -115,26 +114,26 @@ func (d *Daemon) ContainerExecCreate(name string, config *types.ExecConfig) (str
115
114
execConfig .OpenStdin = config .AttachStdin
116
115
execConfig .OpenStdout = config .AttachStdout
117
116
execConfig .OpenStderr = config .AttachStderr
118
- execConfig .ContainerID = container .ID
117
+ execConfig .ContainerID = cntr .ID
119
118
execConfig .DetachKeys = keys
120
119
execConfig .Entrypoint = entrypoint
121
120
execConfig .Args = args
122
121
execConfig .Tty = config .Tty
123
122
execConfig .Privileged = config .Privileged
124
123
execConfig .User = config .User
125
124
126
- linkedEnv , err := d .setupLinkedContainers (container )
125
+ linkedEnv , err := d .setupLinkedContainers (cntr )
127
126
if err != nil {
128
127
return "" , err
129
128
}
130
- execConfig .Env = utils .ReplaceOrAppendEnvValues (container .CreateDaemonEnvironment (config .Tty , linkedEnv ), config .Env )
129
+ execConfig .Env = container .ReplaceOrAppendEnvValues (cntr .CreateDaemonEnvironment (config .Tty , linkedEnv ), config .Env )
131
130
if len (execConfig .User ) == 0 {
132
- execConfig .User = container .Config .User
131
+ execConfig .User = cntr .Config .User
133
132
}
134
133
135
- d .registerExecCommand (container , execConfig )
134
+ d .registerExecCommand (cntr , execConfig )
136
135
137
- d .LogContainerEvent (container , "exec_create: " + execConfig .Entrypoint + " " + strings .Join (execConfig .Args , " " ))
136
+ d .LogContainerEvent (cntr , "exec_create: " + execConfig .Entrypoint + " " + strings .Join (execConfig .Args , " " ))
138
137
139
138
return execConfig .ID , nil
140
139
}
0 commit comments