Remove unnecessary whoami

Closes #2213
This commit is contained in:
Anmol Sethi 2020-10-21 16:39:30 -04:00
parent 14287df655
commit 4a3d2e5a94
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
2 changed files with 1 additions and 4 deletions

View File

@ -43,5 +43,6 @@ EXPOSE 8080
# the uid will remain the same. note: only relevant if -u isn't passed to
# docker-run.
USER 1000
ENV USER=coder
WORKDIR /home/coder
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]

View File

@ -1,10 +1,6 @@
#!/bin/sh
set -eu
# This isn't set by default.
USER="$(whoami)"
export USER
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