mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-01-09 05:06:46 -06:00
Trying to make fix, updating to version 2.0.2
This commit is contained in:
parent
47d6a61a28
commit
f68ef82de3
12
Dockerfile
12
Dockerfile
@ -12,8 +12,8 @@ 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 --gecos '' --disabled-password vscode \
|
RUN adduser --uid 1001 --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)" \
|
||||||
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
|
&& curl -fsSL "https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-$ARCH.tar.gz" | tar -C /usr/local/bin -xzf - \
|
||||||
@ -22,10 +22,6 @@ RUN ARCH="$(dpkg --print-architecture)" \
|
|||||||
&& mkdir -p /etc/fixuid \
|
&& mkdir -p /etc/fixuid \
|
||||||
&& printf "user: vscode\ngroup: vscode\n" > /etc/fixuid/config.yml
|
&& printf "user: vscode\ngroup: vscode\n" > /etc/fixuid/config.yml
|
||||||
|
|
||||||
USER 1000
|
|
||||||
ENV USER=vscode
|
|
||||||
WORKDIR /home/vscode
|
|
||||||
|
|
||||||
#Instalando devtunnel
|
#Instalando devtunnel
|
||||||
#Comandos que no se deben olvidar correr al crear el devtunnel
|
#Comandos que no se deben olvidar correr al crear el devtunnel
|
||||||
#devtunnel user login -g -d
|
#devtunnel user login -g -d
|
||||||
@ -48,4 +44,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"]
|
@ -13,14 +13,14 @@ 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)"
|
||||||
|
|
||||||
if [ "${DOCKER_USER-}" ]; then
|
if [ "${HOME_USER-}" ]; then
|
||||||
USER="$DOCKER_USER"
|
USER="$HOME_USER"
|
||||||
if [ "$DOCKER_USER" != "$(whoami)" ]; then
|
if [ "$HOME_USER" != "$(whoami)" ]; then
|
||||||
echo "$DOCKER_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
|
||||||
# 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 "$DOCKER_USER" vscode
|
sudo usermod --login "$HOME_USER" vscode
|
||||||
sudo groupmod -n "$DOCKER_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
|
||||||
fi
|
fi
|
||||||
|
@ -1 +1 @@
|
|||||||
2.0.1
|
2.0.2
|
Loading…
Reference in New Issue
Block a user