Skip to content

Commit 1a0cc94

Browse files
drop out change /etc/hosts if user is not root
1 parent 813e62b commit 1a0cc94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

init-plain/opt/entry/11-host-internal.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ function fix_linux_internal_host() {
99
echo 'Added $DOCKER_INTERNAL_HOST to hosts /etc/hosts'
1010
fi
1111
}
12-
12+
if [[ $(id -u) -ne 0 ]];then
13+
exit 0
14+
fi
1315
fix_linux_internal_host

0 commit comments

Comments
 (0)