Skip to content

Commit 4a3d2e5

Browse files
committed
Remove unnecessary whoami
Closes #2213
1 parent 14287df commit 4a3d2e5

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

ci/release-image/Dockerfile

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

ci/release-image/entrypoint.sh

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/bin/sh
22
set -eu
33

4-
# This isn't set by default.
5-
USER="$(whoami)"
6-
export USER
7-
84
if [ "${DOCKER_USER-}" ] && [ "$DOCKER_USER" != "$USER" ]; then
95
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
106
# Unfortunately we cannot change $HOME as we cannot move any bind mounts

0 commit comments

Comments
 (0)