Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Pass --privileged for the temporary container in rewrite_etc_hosts
Browse files Browse the repository at this point in the history
Otherwise we run into selinux issues on fedora23 (and probably other
selinux distros).
  • Loading branch information
dpw committed Oct 22, 2015
1 parent acdc70f commit 85dad58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weave
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,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 \
docker run --rm --net=none --privileged \
-v $CONTAINERS_PATH:$MNT \
--entrypoint=sh \
$EXEC_IMAGE -c "echo '$CONTENTS' > $MNT_HOSTS && rm -f $MNT_HOSTS && echo '$CONTENTS' > $MNT_HOSTS"
Expand Down

0 comments on commit 85dad58

Please sign in to comment.