Pass --privileged for the temporary container in rewrite_etc_hosts
Otherwise we run into selinux issues on fedora23 (and probably other selinux distros).
This commit is contained in:
1 parent
acdc70f72a
commit
85dad58cfe
1 file changed
+1
-1
@@ -1033,7 +1033,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 \
|
docker run --rm --net=none --privileged \
|
||||||
-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