mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update client code with api changes
Using new methods from engine-api, that make it clearer which element is required when consuming the API. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
9802d7d10f
commit
b9c94b70bf
26 changed files with 174 additions and 238 deletions
|
|
@ -36,14 +36,13 @@ func (s *containerRouter) postContainerExecCreate(ctx context.Context, w http.Re
|
|||
if err := json.NewDecoder(r.Body).Decode(execConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
execConfig.Container = name
|
||||
|
||||
if len(execConfig.Cmd) == 0 {
|
||||
return fmt.Errorf("No exec command specified")
|
||||
}
|
||||
|
||||
// Register an instance of Exec in container.
|
||||
id, err := s.backend.ContainerExecCreate(execConfig)
|
||||
id, err := s.backend.ContainerExecCreate(name, execConfig)
|
||||
if err != nil {
|
||||
logrus.Errorf("Error setting up exec command in container %s: %v", name, err)
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue