mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-06-18 20:08:13 -06:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
d596af8a2f
|
|||
680e3810b6
|
@ -4,7 +4,9 @@ set -eu
|
|||||||
# Check if we are root
|
# Check if we are root
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "This script must be run as root" 1>&2
|
echo "This script must be run as root" 1>&2
|
||||||
exec sudo /usr/bin/entrypoint.sh
|
sudo bash -c "echo HOME_USER=$HOME_USER >> /etc/environment"
|
||||||
|
sudo bash -c "echo VSCODE_TUNNEL_NAME=$VSCODE_TUNNEL_NAME >> /etc/environment"
|
||||||
|
exec sudo bash -c "source /etc/environment; /usr/bin/entrypoint.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${HOME_USER-}" ]]; then
|
if [[ -z "${HOME_USER-}" ]]; then
|
||||||
@ -17,7 +19,7 @@ eval "$(fixuid -q)"
|
|||||||
|
|
||||||
if [ "${HOME_USER-}" ]; then
|
if [ "${HOME_USER-}" ]; then
|
||||||
USER="$HOME_USER"
|
USER="$HOME_USER"
|
||||||
if [[ "${HOME_USER-}" == "vscode" ]]; then
|
if [[ "${HOME_USER-}" != "vscode" ]]; then
|
||||||
if ! id -u $HOME_USER > /dev/null 2>&1; then
|
if ! id -u $HOME_USER > /dev/null 2>&1; then
|
||||||
sudo adduser --disabled-password --gecos "" ${HOME_USER}
|
sudo adduser --disabled-password --gecos "" ${HOME_USER}
|
||||||
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||||
|
@ -1 +1 @@
|
|||||||
2.0.56
|
2.0.58
|
Reference in New Issue
Block a user