Skip to content

Commit

Permalink
change GID of app group when changing UID of app user
Browse files Browse the repository at this point in the history
  • Loading branch information
zonescape authored and umputun committed Dec 4, 2024
1 parent 3921248 commit 5c3b4f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base.alpine/files/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if [[ ${uid} -eq 0 ]]; then
if [[ "${APP_UID}" -ne "1001" ]]; then
echo "set custom APP_UID=${APP_UID}"
sed -i "s/:1001:1001:/:${APP_UID}:${APP_UID}:/g" /etc/passwd
sed -i "s/:1001:/:${APP_UID}:/g" /etc/group
else
echo "custom APP_UID not defined, using default uid=1001"
fi
Expand Down

0 comments on commit 5c3b4f7

Please sign in to comment.