Spaces:
Sleeping
Sleeping
Commit
·
dfd32bf
1
Parent(s):
87aacc5
Update entrypoint.sh
Browse files- entrypoint.sh +8 -5
entrypoint.sh
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
if
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
fi
|
| 8 |
|
| 9 |
-
# Run the
|
| 10 |
exec "$@"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# entrypoint.sh
|
| 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 the user with the specified UID
|
| 9 |
+
useradd -m -u "$USER_ID" user
|
| 10 |
fi
|
| 11 |
|
| 12 |
+
# Run the main command
|
| 13 |
exec "$@"
|