circulartext commited on
Commit
b959ebe
·
1 Parent(s): 28175d8

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +8 -6
entrypoint.sh CHANGED
@@ -1,9 +1,11 @@
1
- #!/bin/sh
2
- # entrypoint.sh
3
 
4
- # Set execute permission for the script
5
- chmod +x /usr/local/bin/entrypoint.sh
 
 
6
 
7
- # Run gosu to switch user and execute the provided command
8
- gosu user "$@"
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