1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Allow user to choose the IP address for the container

Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
Alessandro Boch
2016-01-07 16:18:34 -08:00
parent 19b063e740
commit 2bb3fc1bc5
26 changed files with 412 additions and 157 deletions

View File

@ -332,7 +332,7 @@ func (s *containerRouter) postContainerUpdate(ctx context.Context, w http.Respon
return err
}
_, hostConfig, err := runconfig.DecodeContainerConfig(r.Body)
_, hostConfig, _, err := runconfig.DecodeContainerConfig(r.Body)
if err != nil {
return err
}
@ -358,7 +358,7 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
name := r.Form.Get("name")
config, hostConfig, err := runconfig.DecodeContainerConfig(r.Body)
config, hostConfig, networkingConfig, err := runconfig.DecodeContainerConfig(r.Body)
if err != nil {
return err
}
@ -366,10 +366,11 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
adjustCPUShares := version.LessThan("1.19")
ccr, err := s.backend.ContainerCreate(types.ContainerCreateConfig{
Name: name,
Config: config,
HostConfig: hostConfig,
AdjustCPUShares: adjustCPUShares,
Name: name,
Config: config,
HostConfig: hostConfig,
NetworkingConfig: networkingConfig,
AdjustCPUShares: adjustCPUShares,
})
if err != nil {
return err