Merge pull request #2838 from weaveworks/tweak-privileged
Remove some unnecessary --privileged flags
This commit is contained in:
commit
b128562b41
1 file changed
+2
-2
@@ -499,7 +499,7 @@ util_op() {
|
|||||||
if command_exists weaveutil ; then
|
if command_exists weaveutil ; then
|
||||||
weaveutil "$@"
|
weaveutil "$@"
|
||||||
else
|
else
|
||||||
docker run --rm --privileged --net=host --pid=host $(docker_sock_options) \
|
docker run --rm --pid=host $(docker_run_options) \
|
||||||
--entrypoint=/usr/bin/weaveutil $EXEC_IMAGE "$@"
|
--entrypoint=/usr/bin/weaveutil $EXEC_IMAGE "$@"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -1187,7 +1187,7 @@ rewrite_etc_hosts() {
|
|||||||
CONTENTS="$(etc_hosts_contents $FQDN "$@")"
|
CONTENTS="$(etc_hosts_contents $FQDN "$@")"
|
||||||
# rewrite /etc/hosts, unlinking the file (so Docker does not modify it again) but
|
# rewrite /etc/hosts, unlinking the file (so Docker does not modify it again) but
|
||||||
# leaving it with valid contents...
|
# leaving it with valid contents...
|
||||||
docker run --rm --net=none -e WEAVE_CIDR=none --privileged \
|
docker run --rm --net=none -e WEAVE_CIDR=none \
|
||||||
-v $CONTAINERS_PATH:$MNT \
|
-v $CONTAINERS_PATH:$MNT \
|
||||||
--entrypoint=sh \
|
--entrypoint=sh \
|
||||||
$EXEC_IMAGE -c "echo '$CONTENTS' > $MNT_HOSTS && rm -f $MNT_HOSTS && echo '$CONTENTS' > $MNT_HOSTS"
|
$EXEC_IMAGE -c "echo '$CONTENTS' > $MNT_HOSTS && rm -f $MNT_HOSTS && echo '$CONTENTS' > $MNT_HOSTS"
|
||||||
|
|||||||
Reference in new issue
Block a user