Spaces:
Sleeping
Sleeping
Commit
·
2a51fee
1
Parent(s):
dfd32bf
Update entrypoint.sh
Browse files- entrypoint.sh +5 -5
entrypoint.sh
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
|
| 3 |
|
| 4 |
# Check if the user already exists
|
| 5 |
if id "$USER_ID" >/dev/null 2>&1; then
|
| 6 |
-
|
| 7 |
else
|
| 8 |
-
|
| 9 |
-
|
| 10 |
fi
|
| 11 |
|
| 12 |
-
# Run the
|
| 13 |
exec "$@"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
|
| 4 |
# Check if the user already exists
|
| 5 |
if id "$USER_ID" >/dev/null 2>&1; then
|
| 6 |
+
echo "User with ID $USER_ID already exists."
|
| 7 |
else
|
| 8 |
+
# Create a new user with the specified ID
|
| 9 |
+
useradd -m -u "$USER_ID" user
|
| 10 |
fi
|
| 11 |
|
| 12 |
+
# Run the CMD or any other command you want to execute
|
| 13 |
exec "$@"
|