mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-06-19 04:18:11 -06:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
ac7a82f0ca | |||
9bac2433a6 | |||
d8a291c82d |
@ -12,7 +12,7 @@ RUN sudo apt-get install -y wget
|
|||||||
#Instalando jq
|
#Instalando jq
|
||||||
RUN sudo apt-get install -y jq
|
RUN sudo apt-get install -y jq
|
||||||
|
|
||||||
RUN adduser --uid 1001 --gecos '' --disabled-password vscode \
|
RUN adduser --gecos '' --disabled-password vscode \
|
||||||
&& echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
|
&& echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
|
||||||
|
|
||||||
RUN ARCH="$(dpkg --print-architecture)" \
|
RUN ARCH="$(dpkg --print-architecture)" \
|
||||||
|
@ -13,19 +13,19 @@ fi
|
|||||||
# Otherwise the current container UID may not exist in the passwd database.
|
# Otherwise the current container UID may not exist in the passwd database.
|
||||||
eval "$(fixuid -q)"
|
eval "$(fixuid -q)"
|
||||||
|
|
||||||
echo "HOME_USER: ${HOME_USER}"
|
|
||||||
echo "whoami: $(whoami)"
|
|
||||||
|
|
||||||
if [ "${HOME_USER-}" ]; then
|
if [ "${HOME_USER-}" ]; then
|
||||||
USER="$HOME_USER"
|
USER="$HOME_USER"
|
||||||
if [ "$HOME_USER" != "$(whoami)" ]; then
|
if [ "$HOME_USER" != "$(whoami)" ]; then
|
||||||
|
adduser --disabled-password --gecos "" ${HOME_USER}
|
||||||
echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||||
|
su - $HOME_USER
|
||||||
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
|
# 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.
|
# nor can we bind mount $HOME into a new home as that requires a privileged container.
|
||||||
sudo usermod --login "$HOME_USER" vscode
|
sudo usermod --login "$DOCKER_USER" vscode
|
||||||
sudo groupmod -n "$HOME_USER" vscode
|
sudo groupmod -n "$DOCKER_USER" vscode
|
||||||
|
|
||||||
sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
|
sudo sed -i "/vscode/d" /etc/sudoers.d/nopasswd
|
||||||
|
sudo cd /home/${HOME_USER}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2.0.3
|
2.0.6
|
Reference in New Issue
Block a user