Don't need --privileged when writing /etc/hosts

This commit is contained in:
Bryan Boreham committed 2017-03-10 11:55:22 +00:00
1 parent 5860332e49
commit ca523fa335
1 file changed
+1 -1
+1 -1
View File
@@ -1187,7 +1187,7 @@ rewrite_etc_hosts() {
CONTENTS="$(etc_hosts_contents $FQDN "$@")"
# rewrite /etc/hosts, unlinking the file (so Docker does not modify it again) but
# 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 \
--entrypoint=sh \
$EXEC_IMAGE -c "echo '$CONTENTS' > $MNT_HOSTS && rm -f $MNT_HOSTS && echo '$CONTENTS' > $MNT_HOSTS"