Merge remote-tracking branch 'upstream/1.0'

This commit is contained in:
Paul Bellamy committed 2015-08-04 14:29:12 +01:00
commit 1d1ebc103d
3 files changed
+25 -6

No files matched your search

+9
View File
@@ -3,6 +3,7 @@ package proxy
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
@@ -17,6 +18,10 @@ import (
const MaxDockerHostname = 64
var (
ErrNoCommandSpecified = errors.New("No command specified")
)
type createContainerInterceptor struct{ proxy *Proxy }
type createContainerRequestBody struct {
@@ -109,6 +114,10 @@ func (i *createContainerInterceptor) setWeaveWaitEntrypoint(container *docker.Co
}
}
if len(container.Entrypoint) == 0 && len(container.Cmd) == 0 {
return ErrNoCommandSpecified
}
if len(container.Entrypoint) == 0 || container.Entrypoint[0] != weaveWaitEntrypoint[0] {
entrypoint := weaveWaitEntrypoint
if i.proxy.NoRewriteHosts {