Skip to content

Commit 32c5ed8

Browse files
authored
release-image: Ignore $DOCKER_USER on restart (coder#2458)
Closes coder#2267
1 parent 244afa4 commit 32c5ed8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/release-image/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eu
55
# Otherwise the current container UID may not exist in the passwd database.
66
eval "$(fixuid -q)"
77

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

0 commit comments

Comments
 (0)