Skip to content

Commit e2e6a67

Browse files
authored
Re-fix coder#3330
1 parent 69df011 commit e2e6a67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ci/release-image/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ eval "$(fixuid -q)"
77

88
if [ "${DOCKER_USER-}" ]; then
99
USER="$DOCKER_USER"
10-
if [ "$DOCKER_USER" != "$(whoami)" ]; then
10+
if [ "$DOCKER_USER" != "$(whoami)" -a -z "$(id -u $DOCKER_USER 2>/dev/null)" ]; then
1111
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
1212
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
1313
# nor can we bind mount $HOME into a new home as that requires a privileged container.

0 commit comments

Comments
 (0)