Skip to content

Commit 8751847

Browse files
committed
Dockerfile: rename mount to workspace, install the lts of npm, tell docker to switch the shell from interactive to login (prevents errors when installing nvm)
1 parent e63b047 commit 8751847

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ 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 sudo
44
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
5-
&& useradd -ms /bin/bash -G sudo $USERNAME
6-
USER $USERNAME
5+
&& useradd -ms /bin/bash -u 1002 -G sudo $USERNAME
76
WORKDIR /home/$USERNAME
7+
USER $USERNAME
8+
SHELL ["/bin/bash", "--login", "-c"]
89
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash \
910
&& . ~/.nvm/nvm.sh \
10-
&& nvm install --lts=hydrogen
11+
&& nvm install --lts=hydrogen \
12+
&& npm install -g [email protected]
1113

1214
# copy local repo into a volume
1315
FROM base-with-deps AS mfbtech-react-async-renderer-dev-env
14-
RUN mkdir /home/$USERNAME/git
15-
COPY --chown=$USERNAME:$USERNAME . /home/$USERNAME/git
16-
VOLUME /home/$USERNAME/git
16+
RUN mkdir /home/$USERNAME/workspace
17+
COPY --chown=$USERNAME:$USERNAME . /home/$USERNAME/workspace
18+
VOLUME /home/$USERNAME/workspace

0 commit comments

Comments
 (0)