Merge remote-tracking branch 'upstream/1.0'
Conflicts: proxy/create_container_interceptor.go proxy/create_exec_interceptor.go proxy/proxy.go proxy/start_container_interceptor.go
This commit is contained in:
commit
a0876becbc
5 files changed
+38
-13
No files matched your search
@@ -25,9 +25,9 @@ type createContainerRequestBody struct {
|
||||
MacAddress string `json:"MacAddress,omitempty" yaml:"MacAddress,omitempty"`
|
||||
}
|
||||
|
||||
// Replacement for docker.NoSuchImage, which does not contain the
|
||||
// image name, which in turn breaks docker clients post 1.7.0 since
|
||||
// they expect the image name to be present in errors.
|
||||
// ErrNoSuchImage replaces docker.NoSuchImage, which does not contain the image
|
||||
// name, which in turn breaks docker clients post 1.7.0 since they expect the
|
||||
// image name to be present in errors.
|
||||
type ErrNoSuchImage struct {
|
||||
Name string
|
||||
}
|
||||
@@ -48,7 +48,9 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if cidrs, ok := i.proxy.weaveCIDRsFromConfig(container.Config); ok {
|
||||
if cidrs, err := i.proxy.weaveCIDRsFromConfig(container.Config, container.HostConfig); err != nil {
|
||||
Log.Infof("Ignoring container due to %s", err)
|
||||
} else {
|
||||
Log.Infof("Creating container with WEAVE_CIDR \"%s\"", strings.Join(cidrs, " "))
|
||||
if container.HostConfig == nil {
|
||||
container.HostConfig = &docker.HostConfig{}
|
||||
|
||||
Reference in new issue
Block a user