1
- FROM node:16-bullseye AS base-with-deps
2
-
1
+ FROM debian:bullseye
3
2
ARG USERNAME=vscode
4
-
5
- # setup the vscode user for the developer
6
- RUN groupadd -r $USERNAME \
7
- && useradd --no-log-init -rm -d /home/$USERNAME -s /bin/bash -g $USERNAME $USERNAME
8
- USER $USERNAME
3
+ RUN apt-get update
4
+ RUN apt-get -y install git fzf ripgrep curl python3 ssh sudo locales gnupg lsb-release libnss3-tools gstreamer1.0-gl gstreamer1.0-plugins-ugly
5
+ # set the locale
6
+ RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
7
+ locale-gen
8
+ ENV LANG en_US.UTF-8
9
+ ENV LANGUAGE en_US:en
10
+ ENV LC_ALL en_US.UTF-8
11
+ # configure terminal
12
+ ENV TERM="xterm-256color"
13
+ ADD https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash .git-completion.bash
14
+ ADD https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh .git-prompt.sh
15
+ COPY docker/bashrc .bashrc
16
+ # setup the user for the developer
17
+ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
18
+ RUN useradd -ms /bin/bash -u 1002 -G sudo $USERNAME
19
+ RUN chown -R $USERNAME /home/$USERNAME
9
20
WORKDIR /home/$USERNAME
10
-
11
- # copy local repo into a volume
12
- FROM base-with-deps AS mfbtech-react-async-renderer-dev-env
13
- RUN mkdir /home/$USERNAME/git
14
- COPY --chown=$USERNAME:$USERNAME . /home/$USERNAME/git
15
- VOLUME /home/$USERNAME/git
21
+ USER $USERNAME
22
+ # setup ssh
23
+ RUN mkdir -p -m 0700 ~/.ssh
24
+ RUN ssh-keyscan github.com >> ~/.ssh/known_hosts
25
+ SHELL ["/bin/bash" , "--login" , "-c" ]
26
+ # install nvm with a specified version of node
27
+ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \
28
+ && . ~/.nvm/nvm.sh \
29
+ && nvm install --lts=gallium
30
+ # clone repo
31
+ RUN --mount=type=ssh,uid=1002 git clone
[email protected] :MFB-Technologies-Inc/react-async-renderer /home/$USERNAME/workspace/react-async-renderer
32
+ # set working dir
33
+ WORKDIR /home/$USERNAME/workspace/react-async-renderer
34
+ VOLUME /home/$USERNAME/workspace/react-async-renderer
0 commit comments