release-image: Ignore $DOCKER_USER on restart (#2458)

Closes #2267
This commit is contained in:
Anmol Sethi 2020-12-14 13:57:36 -05:00 committed by GitHub
parent 244afa402e
commit 32c5ed8a33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ set -eu
# Otherwise the current container UID may not exist in the passwd database. # Otherwise the current container UID may not exist in the passwd database.
eval "$(fixuid -q)" eval "$(fixuid -q)"
if [ "${DOCKER_USER-}" ]; then if [ "${DOCKER_USER-}" ] && [ "$DOCKER_USER" != "$USER" ]; then
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null 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 # 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. # nor can we bind mount $HOME into a new home as that requires a privileged container.