Skip to content

Commit

Permalink
Fix user rename when restarting container (#7012)
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl12345 authored Oct 18, 2024
1 parent bea906f commit dd2e9fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci/release-image/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ eval "$(fixuid -q)"

if [ "${DOCKER_USER-}" ]; then
USER="$DOCKER_USER"
if [ "$DOCKER_USER" != "$(whoami)" ]; then
if [ -z "$(id -u "$DOCKER_USER" 2>/dev/null)" ]; 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.
Expand Down

0 comments on commit dd2e9fc

Please sign in to comment.