Spaces:
Sleeping
Sleeping
Commit
·
b959ebe
1
Parent(s):
28175d8
Update entrypoint.sh
Browse files- entrypoint.sh +8 -6
entrypoint.sh
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
-
#!/bin/
|
| 2 |
-
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
-
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
# Run
|
| 8 |
-
|
| 9 |
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
|
| 4 |
+
# Set the user dynamically during runtime based on an environment variable
|
| 5 |
+
if [ -n "$USER_ID" ]; then
|
| 6 |
+
adduser --disabled-password --gecos '' --uid $USER_ID user
|
| 7 |
+
fi
|
| 8 |
|
| 9 |
+
# Run the CMD
|
| 10 |
+
exec "$@"
|
| 11 |
|