Skip to content

Commit 8925442

Browse files
committed
Dockerfile: setup vscode user as sudoer, install node and nvm in vscode home dir
1 parent 9bfd51f commit 8925442

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
FROM debian:bullseye-slim AS base-with-deps
22
ARG USERNAME=vscode
33
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl git
4+
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
5+
&& useradd -ms /bin/bash -G sudo $USERNAME
6+
USER $USERNAME
7+
WORKDIR /home/$USERNAME
48
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash \
59
&& . ~/.nvm/nvm.sh \
610
&& nvm install --lts=hydrogen
7-
RUN groupadd -r $USERNAME \
8-
&& useradd --no-log-init -rm -d /home/$USERNAME -s /bin/bash -g $USERNAME $USERNAME
9-
USER $USERNAME
10-
WORKDIR /home/$USERNAME
1111

1212
# copy local repo into a volume
1313
FROM base-with-deps AS mfbtech-react-async-renderer-dev-env

0 commit comments

Comments
 (0)