Update github.com/docker/libcompose
Update github.com/docker/libcompose in glide.* files. Vendor github.com/docker/libcompose update.
This commit is contained in:
parent
7ff6c32452
commit
19a5ba3264
3 changed files with 24 additions and 4 deletions
4
glide.lock
generated
4
glide.lock
generated
|
@ -1,4 +1,4 @@
|
|||
hash: b0b29ccc1d46dcfb5a689d225fdd35ea3ffebb9e149bf0081229033cb515ad45
|
||||
hash: a2fcd3a2a1472cde2a2703cc3e54ba8d293546b800c7ff19a9c71d2e4657d471
|
||||
updated: 2017-08-10T19:56:04.346751095+02:00
|
||||
imports:
|
||||
- name: cloud.google.com/go
|
||||
|
@ -752,7 +752,7 @@ testImports:
|
|||
- cli/config
|
||||
- cli/config/configfile
|
||||
- name: github.com/docker/libcompose
|
||||
version: 0ad950cbeb3d72107613dd220b5e9d7e001b890b
|
||||
version: 1b708aac26a4fc6f9bff31728a8e3a252ef57dbd
|
||||
subpackages:
|
||||
- config
|
||||
- docker
|
||||
|
|
|
@ -203,7 +203,7 @@ import:
|
|||
testImport:
|
||||
- package: github.com/stvp/go-udp-testing
|
||||
- package: github.com/docker/libcompose
|
||||
version: 0ad950cbeb3d72107613dd220b5e9d7e001b890b
|
||||
version: 1b708aac26a4fc6f9bff31728a8e3a252ef57dbd
|
||||
- package: github.com/go-check/check
|
||||
version: 11d3bc7aa68e238947792f30573146a3231fc0f1
|
||||
- package: github.com/libkermit/compose
|
||||
|
|
22
vendor/github.com/docker/libcompose/docker/service/service_create.go
generated
vendored
22
vendor/github.com/docker/libcompose/docker/service/service_create.go
generated
vendored
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/api/types"
|
||||
containertypes "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/network"
|
||||
"github.com/docker/libcompose/config"
|
||||
composecontainer "github.com/docker/libcompose/docker/container"
|
||||
"github.com/docker/libcompose/labels"
|
||||
|
@ -55,9 +56,28 @@ func (s *Service) createContainer(ctx context.Context, namer Namer, oldContainer
|
|||
configWrapper.HostConfig.Binds = util.Merge(configWrapper.HostConfig.Binds, volumeBinds(configWrapper.Config.Volumes, &info))
|
||||
}
|
||||
|
||||
networkConfig := configWrapper.NetworkingConfig
|
||||
if configWrapper.HostConfig.NetworkMode != "" && configWrapper.HostConfig.NetworkMode.IsUserDefined() {
|
||||
if networkConfig == nil {
|
||||
networkConfig = &network.NetworkingConfig{
|
||||
EndpointsConfig: map[string]*network.EndpointSettings{
|
||||
string(configWrapper.HostConfig.NetworkMode): {},
|
||||
},
|
||||
}
|
||||
}
|
||||
for key, value := range networkConfig.EndpointsConfig {
|
||||
|
||||
conf := value
|
||||
if value.Aliases == nil {
|
||||
value.Aliases = []string{}
|
||||
}
|
||||
value.Aliases = append(value.Aliases, s.name)
|
||||
networkConfig.EndpointsConfig[key] = conf
|
||||
}
|
||||
}
|
||||
logrus.Debugf("Creating container %s %#v", containerName, configWrapper)
|
||||
// FIXME(vdemeester): long-term will be container.Create(…)
|
||||
container, err := composecontainer.Create(ctx, client, containerName, configWrapper.Config, configWrapper.HostConfig, configWrapper.NetworkingConfig)
|
||||
container, err := composecontainer.Create(ctx, client, containerName, configWrapper.Config, configWrapper.HostConfig, networkConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue