Spaces:
Sleeping
Sleeping
Commit
·
2796752
1
Parent(s):
99ba170
Update entrypoint.sh
Browse files- entrypoint.sh +3 -2
entrypoint.sh
CHANGED
|
@@ -5,9 +5,10 @@ set -e
|
|
| 5 |
if id "$USER_ID" >/dev/null 2>&1; then
|
| 6 |
echo "User with ID $USER_ID already exists."
|
| 7 |
else
|
| 8 |
-
#
|
| 9 |
-
useradd -m -u "$USER_ID" user
|
| 10 |
fi
|
| 11 |
|
| 12 |
# Run the CMD or any other command you want to execute
|
| 13 |
exec "$@"
|
|
|
|
|
|
| 5 |
if id "$USER_ID" >/dev/null 2>&1; then
|
| 6 |
echo "User with ID $USER_ID already exists."
|
| 7 |
else
|
| 8 |
+
# Run useradd with elevated privileges
|
| 9 |
+
gosu root useradd -m -u "$USER_ID" user
|
| 10 |
fi
|
| 11 |
|
| 12 |
# Run the CMD or any other command you want to execute
|
| 13 |
exec "$@"
|
| 14 |
+
|