diff --git a/ci/release-image/entrypoint.sh b/ci/release-image/entrypoint.sh index 4f2f7cfe23911b656ed815c779329cb4d98b4cf9..68e4716fb5d166b201e52b24a6e972e2da1d063d 100755 --- a/ci/release-image/entrypoint.sh +++ b/ci/release-image/entrypoint.sh @@ -5,7 +5,7 @@ set -eu # Otherwise the current container UID may not exist in the passwd database. eval "$(fixuid -q)" -if [ "${DOCKER_USER-}" ]; then +if [ "${DOCKER_USER-}" != "${USER-}" ]; then echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null # Unfortunately we cannot change $HOME as we cannot move any bind mounts # nor can we bind mount $HOME into a new home as that requires a privileged container.