[proxy] Only prepend weavewait if not already present

This way `docker commit` will not stack up weavewaits.
This commit is contained in:
Paul Bellamy committed 2015-06-22 15:24:49 +01:00
1 parent 1bbec56cc7
commit 34aa2e32d8
2 files changed
+14 -2

No files matched your search

+4 -1
View File
@@ -89,7 +89,10 @@ func (i *createContainerInterceptor) setWeaveWaitEntrypoint(container *docker.Co
}
}
container.Entrypoint = append(weaveWaitEntrypoint, container.Entrypoint...)
if len(container.Entrypoint) == 0 || container.Entrypoint[0] != weaveWaitEntrypoint[0] {
container.Entrypoint = append(weaveWaitEntrypoint, container.Entrypoint...)
}
return nil
}