Spaces:
Sleeping
Sleeping
File size: 340 Bytes
b959ebe 45e3447 3f0e6c7 b959ebe 3f0e6c7 b959ebe 5783142 3f0e6c7 b959ebe 755d21d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#!/bin/bash
set -e
# Check if USER_ID environment variable is set
if [ -n "$USER_ID" ]; then
# Create user with specific UID and disabled password
adduser --disabled-password --gecos "" --uid "$USER_ID" user
# Switch to the newly created user
su -l user
fi
# Execute the command provided to the container as arguments
exec "$@"
|