From 32c5ed8a33c7b5e5d3a8bf31410e70a034c72c4c Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 14 Dec 2020 13:57:36 -0500 Subject: [PATCH] release-image: Ignore $DOCKER_USER on restart (#2458) Closes #2267 --- ci/release-image/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release-image/entrypoint.sh b/ci/release-image/entrypoint.sh index 4f2f7cfe..48a17a31 100755 --- a/ci/release-image/entrypoint.sh +++ b/ci/release-image/entrypoint.sh @@ -5,7 +5,7 @@ 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.