Merge pull request #2218 from cdr/whoami-c324
Remove unnecessary whoami
This commit is contained in:
commit
7093f99a78
|
@ -43,11 +43,12 @@ The install script will print out how to run and start using code-server.
|
||||||
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
|
Docs on the install script, manual installation and docker image are at [./doc/install.md](./doc/install.md).
|
||||||
|
|
||||||
### Alpha Program 🐣
|
### Alpha Program 🐣
|
||||||
|
|
||||||
We're working on a cloud platform to make deploying and managing code-server easier. If you don't want to worry about
|
We're working on a cloud platform to make deploying and managing code-server easier. If you don't want to worry about
|
||||||
|
|
||||||
* TLS
|
- TLS
|
||||||
* Authentication
|
- Authentication
|
||||||
* Port Forwarding
|
- Port Forwarding
|
||||||
|
|
||||||
consider [joining our alpha program](https://codercom.typeform.com/to/U4IKyv0W).
|
consider [joining our alpha program](https://codercom.typeform.com/to/U4IKyv0W).
|
||||||
|
|
||||||
|
|
|
@ -43,5 +43,6 @@ EXPOSE 8080
|
||||||
# the uid will remain the same. note: only relevant if -u isn't passed to
|
# the uid will remain the same. note: only relevant if -u isn't passed to
|
||||||
# docker-run.
|
# docker-run.
|
||||||
USER 1000
|
USER 1000
|
||||||
|
ENV USER=coder
|
||||||
WORKDIR /home/coder
|
WORKDIR /home/coder
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]
|
ENTRYPOINT ["/usr/bin/entrypoint.sh", "--bind-addr", "0.0.0.0:8080", "."]
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# This isn't set by default.
|
|
||||||
USER="$(whoami)"
|
|
||||||
export USER
|
|
||||||
|
|
||||||
if [ "${DOCKER_USER-}" ] && [ "$DOCKER_USER" != "$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
|
||||||
|
|
Loading…
Reference in New Issue