Merge branch '1.4'
This commit is contained in:
commit
3e07f03c87
2 files changed
+6
-1
No files matched your search
@@ -15,7 +15,7 @@ func (i *startContainerInterceptor) InterceptRequest(r *http.Request) error {
|
||||
|
||||
// If the client has sent some JSON which might be a HostConfig, add our
|
||||
// parameters back into it, otherwise Docker will consider them overwritten
|
||||
if containerShouldAttach(container) && r.Header.Get("Content-Type") == "application/json" {
|
||||
if containerShouldAttach(container) && r.Header.Get("Content-Type") == "application/json" && r.ContentLength > 0 {
|
||||
params := map[string]interface{}{}
|
||||
if err := unmarshalRequestBody(r, ¶ms); err != nil {
|
||||
return err
|
||||
|
||||
@@ -33,6 +33,11 @@ proxy docker_on $HOST1 create --name=c4 --memory-swap -1 $SMALL_IMAGE echo foo
|
||||
assert_raises "proxy docker_api_on $HOST1 POST /containers/c4/start 'null'"
|
||||
assert "docker_on $HOST1 inspect -f '{{.HostConfig.MemorySwap}}' c4" "-1"
|
||||
|
||||
# Start c4b with an empty HostConfig (generated by Docker 1.11.0-rc2)
|
||||
proxy docker_on $HOST1 create --name=c4b --memory-swap -1 $SMALL_IMAGE echo foo
|
||||
assert_raises "proxy docker_api_on $HOST1 POST /containers/c4b/start ''"
|
||||
assert "docker_on $HOST1 inspect -f '{{.HostConfig.MemorySwap}}' c4b" "-1"
|
||||
|
||||
# Start c6 with both named and unnamed HostConfig
|
||||
proxy docker_on $HOST1 create --name=c6 $SMALL_IMAGE $CHECK_ETHWE_UP
|
||||
proxy docker_api_on $HOST1 POST /containers/c6/start '{"NetworkMode": "container:c2", "HostConfig": {"NetworkMode": "container:c1"}}'
|
||||
|
||||
Reference in new issue
Block a user