Spaces:
Sleeping
Sleeping
Commit
·
90b2859
1
Parent(s):
f46b72d
Update entrypoint.sh
Browse files- entrypoint.sh +9 -2
entrypoint.sh
CHANGED
@@ -5,9 +5,16 @@ set -e
|
|
5 |
if id "$USER_ID" >/dev/null 2>&1; then
|
6 |
echo "User with ID $USER_ID already exists."
|
7 |
else
|
8 |
-
#
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
fi
|
11 |
|
12 |
# Run the CMD or any other command you want to execute
|
13 |
exec "$@"
|
|
|
|
5 |
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
|
9 |
+
mkdir -p "/home/user"
|
10 |
+
|
11 |
+
# Copy the contents of /etc/skel to the user's home directory
|
12 |
+
cp -r /etc/skel/* "/home/user/"
|
13 |
+
|
14 |
+
# Set ownership of the user's home directory
|
15 |
+
chown -R user:user "/home/user"
|
16 |
fi
|
17 |
|
18 |
# Run the CMD or any other command you want to execute
|
19 |
exec "$@"
|
20 |
+
|