Skip to content

Commit

Permalink
release-image: Ignore $DOCKER_USER on restart
Browse files Browse the repository at this point in the history
Closes #2267
  • Loading branch information
nhooyr committed Dec 14, 2020
1 parent 88b8cff commit a5a10f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ci/release-image/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -eu
# Otherwise the current container UID may not exist in the passwd database.
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
# 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.
Expand Down

0 comments on commit a5a10f3

Please sign in to comment.