We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7692baa commit d0345a6Copy full SHA for d0345a6
build/bin/user_setup
@@ -2,12 +2,10 @@
2
set -x
3
4
# ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be)
5
-mkdir -p ${HOME}
6
-chown ${USER_UID}:0 ${HOME}
7
-chmod ug+rwx ${HOME}
8
-
9
-# runtime user will need to be able to self-insert in /etc/passwd
10
-chmod g+rw /etc/passwd
+echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd
+mkdir -p "${HOME}"
+chown "${USER_UID}:0" "${HOME}"
+chmod ug+rwx "${HOME}"
11
12
# no need for this script to remain in the image after running
13
rm $0
0 commit comments