mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-01-09 13:16:48 -06:00
Trying to fix the creation of the user, updating to version 1.1.3
This commit is contained in:
parent
f9351861bd
commit
c17566fd5f
@ -25,7 +25,7 @@ then
|
|||||||
else
|
else
|
||||||
echo "INFO: Group doesn't exist; creating..."
|
echo "INFO: Group doesn't exist; creating..."
|
||||||
# create the group
|
# create the group
|
||||||
addgroup -g "${MY_GID}" "${MY_GROUP}" || (echo "INFO: Group exists but with a different name; renaming..."; groupmod -g "${MY_GID}" -n "${MY_GROUP}" "$(awk -F ':' '{print $1":"$3}' < /etc/group | grep ":${MY_GID}$" | awk -F ":" '{print $1}')")
|
sudo addgroup -g "${MY_GID}" "${MY_GROUP}" || (echo "INFO: Group exists but with a different name; renaming..."; sudo groupmod -g "${MY_GID}" -n "${MY_GROUP}" "$(awk -F ':' '{print $1":"$3}' < /etc/group | grep ":${MY_GID}$" | awk -F ":" '{print $1}')")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -36,15 +36,9 @@ then
|
|||||||
else
|
else
|
||||||
echo "INFO: User doesn't exist; creating..."
|
echo "INFO: User doesn't exist; creating..."
|
||||||
# create the user
|
# create the user
|
||||||
adduser -u "${MY_UID}" -G "${MY_GROUP}" -h "/home/${HOME_USER}" -s /bin/sh -D "${HOME_USER}"
|
sudo adduser -u "${MY_UID}" -G "${MY_GROUP}" -h "/home/${HOME_USER}" -s /bin/sh -D "${HOME_USER}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# make the directories needed to run my app
|
|
||||||
mkdir -p /opt/myapp
|
|
||||||
|
|
||||||
# change ownership of any directories needed to run my app as the proper UID/GID
|
|
||||||
chown -R "${HOME_USER}:${MY_GROUP}" "/opt/myapp"
|
|
||||||
|
|
||||||
# addgroup nonroot
|
# addgroup nonroot
|
||||||
#adduser --disabled-password --gecos "" ${HOME_USER}
|
#adduser --disabled-password --gecos "" ${HOME_USER}
|
||||||
# echo "${HOME_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
# echo "${HOME_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
|
@ -1 +1 @@
|
|||||||
1.1.2
|
1.1.3
|
Loading…
Reference in New Issue
Block a user