Fix bug of --with-ipam not setting entrypoints

This commit is contained in:
Paul Bellamy committed 2015-05-27 13:38:28 +01:00
1 parent 84aa629010
commit cb73b73862
4 files changed
+13 -5

No files matched your search

+3 -2
View File
@@ -11,7 +11,8 @@ import (
)
type createExecInterceptor struct {
client *docker.Client
client *docker.Client
withIPAM bool
}
type createExecRequestBody struct {
@@ -37,7 +38,7 @@ func (i *createExecInterceptor) InterceptRequest(r *http.Request) error {
return err
}
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok {
if cidrs, ok := weaveCIDRsFromConfig(container.Config); ok || i.withIPAM {
Info.Printf("Exec in container %s with WEAVE_CIDR \"%s\"", container.ID, strings.Join(cidrs, " "))
options.Cmd = append(weaveWaitEntrypoint, options.Cmd...)
}