circulartext commited on
Commit
e1ddd8e
·
1 Parent(s): 1984ccf

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +10 -11
entrypoint.sh CHANGED
@@ -1,16 +1,15 @@
1
- #!/bin/sh
2
- set -e
3
 
4
- # Check if the user needs to be created
5
- if [ "$(id -u)" = "0" ]; then
6
- if id "$USER_ID" >/dev/null 2>&1; then
7
- echo "User with ID $USER_ID already exists."
8
- else
9
- useradd -m -u "$USER_ID" user
10
- chown -R user:user /app
11
- fi
12
  fi
13
 
14
- # Execute the CMD or provided command
15
  exec "$@"
16
 
 
 
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 (uvicorn)
13
  exec "$@"
14
 
15
+