Merge pull request #1206 from weaveworks/1201-weavewait-ro

[proxy] Mount weavewait readonly so it can't be tampered with

Fixes #1201.
This commit is contained in:
Matthias Radestock committed 2015-07-21 11:41:48 +01:00
commit a20ca49344
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -53,7 +53,7 @@ func (i *createContainerInterceptor) InterceptRequest(r *http.Request) error {
if container.HostConfig == nil {
container.HostConfig = &docker.HostConfig{}
}
container.HostConfig.VolumesFrom = append(container.HostConfig.VolumesFrom, "weaveproxy")
container.HostConfig.VolumesFrom = append(container.HostConfig.VolumesFrom, "weaveproxy:ro")
if container.Config == nil {
container.Config = &docker.Config{}
}
+3
View File
@@ -25,4 +25,7 @@ assert "entrypoint c2" "$(entrypoint $COMMITTED_IMAGE)"
docker_on $HOST1 run -dit --name c3 $SMALL_IMAGE /bin/sh
assert_raises "proxy docker_on $HOST1 exec c3 true"
# Check we can't modify weavewait
assert_raises "proxy docker_on $HOST1 run -e 'WEAVE_CIDR=10.2.1.2/24' $BASE_IMAGE touch /w/w" 1
end_suite