Spaces:
Sleeping
Sleeping
Commit
·
02f7e02
1
Parent(s):
dca556b
Update entrypoint.sh
Browse files- entrypoint.sh +3 -5
entrypoint.sh
CHANGED
|
@@ -6,16 +6,14 @@ if id "$USER_ID" >/dev/null 2>&1; then
|
|
| 6 |
echo "User with ID $USER_ID already exists."
|
| 7 |
else
|
| 8 |
# Create a home directory for the user in the current working directory
|
| 9 |
-
mkdir -p "/app/home/user"
|
| 10 |
|
| 11 |
# Copy the contents of /etc/skel to the user's home directory
|
| 12 |
cp -r /etc/skel/* "/app/home/user/"
|
| 13 |
|
| 14 |
-
# Set ownership of the user's home directory
|
| 15 |
-
|
| 16 |
fi
|
| 17 |
|
| 18 |
# Run the CMD or any other command you want to execute
|
| 19 |
exec "$@"
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 6 |
echo "User with ID $USER_ID already exists."
|
| 7 |
else
|
| 8 |
# Create a home directory for the user in the current working directory
|
| 9 |
+
mkdir -p -m 777 "/app/home/user"
|
| 10 |
|
| 11 |
# Copy the contents of /etc/skel to the user's home directory
|
| 12 |
cp -r /etc/skel/* "/app/home/user/"
|
| 13 |
|
| 14 |
+
# Set overly permissive ownership of the user's home directory
|
| 15 |
+
chmod -R 777 "/app/home/user"
|
| 16 |
fi
|
| 17 |
|
| 18 |
# Run the CMD or any other command you want to execute
|
| 19 |
exec "$@"
|
|
|
|
|
|