diff --git a/Makefile b/Makefile index db56bca..87417df 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,15 @@ export ${BUILD_VER_ENV} # 22.04 - jammy # 24.04 - noble +# 26.04 - resolute UBUNTU_VERSION ?= jammy UBUNTU_VERSION_NUMBER = 22.04 ifeq (${UBUNTU_VERSION}, noble) UBUNTU_VERSION_NUMBER = 24.04 endif +ifeq (${UBUNTU_VERSION}, resolute) +UBUNTU_VERSION_NUMBER = 26.04 +endif DEBIAN_VERSION := "1.3.0" diff --git a/tools/deb/base-image/entrypoint.sh b/tools/deb/base-image/entrypoint.sh index 21a1889..a64569b 100644 --- a/tools/deb/base-image/entrypoint.sh +++ b/tools/deb/base-image/entrypoint.sh @@ -22,6 +22,12 @@ sysctl -w vm.max_map_count=262144 if [[ -n "${USER_NAME:-}" && -n "${USER_UID:-}" && -n "${USER_GID:-}" ]]; then echo "Creating user ${USER_NAME} with UID=${USER_UID}, GID=${USER_GID}..." + existing_user="$(getent passwd "$USER_UID" | cut -d: -f1)" + if [[ -n "$existing_user" && "$existing_user" != "$USER_NAME" ]]; then + echo "Removing existing user $existing_user with UID=$USER_UID..." + userdel -r "$existing_user" || userdel "$existing_user" + fi + if ! getent group "$USER_GID" >/dev/null; then groupadd -g "$USER_GID" "$USER_NAME" fi