mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-06-19 04:18:11 -06:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
cd8b5c19e1
|
|||
a6e4296f25
|
|||
08cf40624d
|
|||
a3b5fe1d6d
|
@ -47,4 +47,8 @@ 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
|
||||||
|
ENV USER=vscode
|
||||||
|
WORKDIR /home/vscode
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
@ -50,10 +50,18 @@ if [ "${HOME_USER-}" ]; then
|
|||||||
# Switch to the user specified by $HOME_USER and start an interactive shell session.
|
# Switch to the user specified by $HOME_USER and start an interactive shell session.
|
||||||
sudo su -l ${HOME_USER}
|
sudo su -l ${HOME_USER}
|
||||||
|
|
||||||
|
# Copy the HOME variable from vscode user to HOME_USER
|
||||||
|
sudo su -l ${HOME_USER} -c "echo \"export HOME=/home/${HOME_USER}\" >> ~/.bashrc"
|
||||||
|
|
||||||
|
# Source the .bashrc file to apply the changes immediately
|
||||||
|
sudo su -l ${HOME_USER} -c "source ~/.bashrc"
|
||||||
|
|
||||||
# Delete the vscode user
|
# Delete the vscode user
|
||||||
if id "vscode" &>/dev/null; then
|
if id "vscode" &>/dev/null; then
|
||||||
sudo chown -R vscode:vscode /home/vscode
|
sudo chown -R vscode:vscode /home/vscode
|
||||||
sudo userdel -r vscode
|
sudo pkill -u vscode
|
||||||
|
sleep 2 # wait for processes to terminate
|
||||||
|
sudo -u root bash -c 'userdel -r vscode'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Switch to the user specified by $HOME_USER and start an interactive shell session.
|
# Switch to the user specified by $HOME_USER and start an interactive shell session.
|
||||||
|
@ -1 +1 @@
|
|||||||
2.0.50
|
2.0.54
|
Reference in New Issue
Block a user