diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index d7ca22b..07186cd 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -501,7 +501,7 @@ __create_service_user() { local create_uid="${4:-${SERVICE_UID:-$USER_UID}}" local create_gid="${5:-${SERVICE_GID:-$USER_GID}}" local random_id="$(__generate_random_uids)" - local create_home_dir="${create_home_dir:-}" + local create_home_dir="${create_home_dir:-/home/$create_user}" grep -sq "^$create_user:" "/etc/passwd" && grep -sq "^$create_group:" "/etc/group" && return [ "$create_user" = "root" ] && [ "$create_group" = "root" ] && return 0 if [ "$RUNAS_USER" != "root" ] && [ "$RUNAS_USER" != "" ]; then @@ -532,7 +532,7 @@ __create_service_user() { fi grep -qs "$create_group" "/etc/group" || exitStatus=$((exitCode + 1)) grep -qs "$create_user" "/etc/passwd" || exitStatus=$((exitCode + 1)) - [ $exitStatus -eq 0 ] && export WORK_DIR="${set_home_dir:-}" + [ $exitStatus -eq 0 ] && export WORK_DIR="${create_home_dir:-}" if [ -n "$WORK_DIR" ]; then [ -d "$WORK_DIR" ] || mkdir -p "$WORK_DIR" [ -d "/etc/.skel" ] && cp -Rf /etc/.skel/. "$WORK_DIR/"