diff --git a/NEWS.md b/NEWS.md index 25f9cc20..c9323b85 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,25 @@ # News +## 2024-12 + +### Changes in pre-built images + +- The feature to change the name of the default non-root user via the `USER` environment variable has been removed. + ([#891](https://github.com/rocker-org/rocker-versioned2/pull/891))\ + If you want to change the default user name, you should creat a new user. + For example, something like this: + + ```dockerfile + FROM rocker/rstudio:4 + ENV DEFAULT_USER=new_user + RUN <\`\e[39m is now deprecated and will be removed in the future.\n" - printf "Please do not use the USER environment variable.\n" - tput sgr0 - printf "\n\n" -fi - if [ "${RUNROOTLESS}" = "true" ]; then echo "deleting the default user ($DEFAULT_USER) since it is not needed." userdel "$DEFAULT_USER" @@ -164,15 +155,6 @@ elif [ "$USERID" -ne 1000 ]; then ## Configure user with a different USERID if r mkdir -p "${USERHOME}" chown -R "$USER" "${USERHOME}" usermod -a -G staff "$USER" -elif [ "$USER" != "$DEFAULT_USER" ]; then - ## cannot move home folder when it's a shared volume, have to copy and change permissions instead - cp -r /home/"$DEFAULT_USER" "${USERHOME}" - ## RENAME the user - usermod -l "$USER" -d /home/"$USER" "$DEFAULT_USER" - groupmod -n "$USER" "$DEFAULT_USER" - usermod -a -G staff "$USER" - chown -R "$USER":"$USER" "${USERHOME}" - echo "USER is now $USER" fi if [ "${RUNROOTLESS}" != "true" ] && [ "$GROUPID" -ne 1000 ]; then ## Configure the primary GID (whether rstudio or $USER) with a different GROUPID if requested.