Skip to content

Commit a5a10f3

Browse files
committed
release-image: Ignore $DOCKER_USER on restart
Closes #2267
1 parent 88b8cff commit a5a10f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ci/release-image/entrypoint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ 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+
9+
if [ "${DOCKER_USER-}" ] && [ "$DOCKER_USER" != "$USER" ]; then
910
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
1011
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
1112
# nor can we bind mount $HOME into a new home as that requires a privileged container.

0 commit comments

Comments
 (0)