mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-06-18 20:08:13 -06:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
50708112ac
|
|||
f29f99181e | |||
8e9ef7bfa9 | |||
762ff44dc8 | |||
ac7a82f0ca | |||
9bac2433a6 |
@ -44,7 +44,7 @@ RUN sudo sysctl -w fs.inotify.max_user_watches=524288
|
|||||||
ADD ./entrypoint.sh /usr/bin/entrypoint.sh
|
ADD ./entrypoint.sh /usr/bin/entrypoint.sh
|
||||||
RUN sudo chmod +x /usr/bin/entrypoint.sh
|
RUN sudo chmod +x /usr/bin/entrypoint.sh
|
||||||
|
|
||||||
#USER 1000
|
USER 1000
|
||||||
ENV USER=vscode
|
ENV USER=vscode
|
||||||
WORKDIR /home/vscode
|
WORKDIR /home/vscode
|
||||||
|
|
||||||
|
@ -16,13 +16,18 @@ eval "$(fixuid -q)"
|
|||||||
if [ "${HOME_USER-}" ]; then
|
if [ "${HOME_USER-}" ]; then
|
||||||
USER="$HOME_USER"
|
USER="$HOME_USER"
|
||||||
if [ "$HOME_USER" != "$(whoami)" ]; then
|
if [ "$HOME_USER" != "$(whoami)" ]; then
|
||||||
echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
if ! id -u $HOME_USER > /dev/null 2>&1; then
|
||||||
|
sudo adduser --disabled-password --gecos "" ${HOME_USER}
|
||||||
|
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||||
|
fi
|
||||||
|
sudo -u $HOME_USER -i
|
||||||
# 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 "$HOME_USER" vscode
|
||||||
sudo groupmod -n "$HOME_USER" vscode
|
# sudo groupmod -n "$HOME_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.4
|
2.0.10
|
Reference in New Issue
Block a user