mirror of
https://github.com/coder/code-server.git
synced 2024-11-22 02:44:44 +03:00
Fix user rename when restarting container (#7012)
This commit is contained in:
parent
bea906f90b
commit
dd2e9fce27
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user