TypescriptDev/.devcontainer/Dockerfile

9 lines
519 B
Docker
Raw Permalink Normal View History

2024-02-06 16:21:10 +00:00
FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye
2024-02-08 03:37:29 +00:00
ENV USER=node
RUN id -u ${USER} &> /dev/null || useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
2024-02-08 02:15:54 +00:00
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
RUN sh -c "$(curl -fsSL https://starship.rs/install.sh)" -y -f && echo 'eval "$(starship init bash)"' >> /home/${USER}/.bashrc
USER ${USER}
WORKDIR /home/${USER}
2024-02-06 16:21:10 +00:00
RUN npm install cnpm -g && cnpm install tsx rimraf @antfu/ni -g