增加判断

This commit is contained in:
Aison 2024-02-07 23:30:12 +08:00
parent 2bb66c9c8b
commit 6b1b9b98dc
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -1,5 +1,5 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye
RUN useradd --groups sudo --no-create-home --shell /bin/bash node \
RUN id -u node &> /dev/null || useradd --groups sudo --no-create-home --shell /bin/bash node \
&& echo "node ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/node \
&& chmod 0440 /etc/sudoers.d/node
RUN sh -c "$(curl -fsSL https://starship.rs/install.sh)" -y -f && echo 'eval "$(starship init bash)"' >> /home/node/.bashrc