-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (42 loc) · 2.01 KB
/
Dockerfile
File metadata and controls
42 lines (42 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM debian:bookworm
ARG USERNAME=vscode
# Add GitHub CLI repo and update, then install all packages in one RUN
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list \
&& apt-get update \
&& apt-get -y install git fzf ripgrep curl python3 ssh sudo locales gnupg lsb-release libnss3-tools gstreamer1.0-gl gstreamer1.0-plugins-ugly gh
# set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# configure terminal
ENV TERM="xterm-256color"
ADD https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash .git-completion.bash
ADD https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh .git-prompt.sh
COPY docker/bashrc .bashrc
# setup the user for the developer
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN useradd -ms /bin/bash -u 1002 -G sudo $USERNAME
RUN chown -R $USERNAME /home/$USERNAME
WORKDIR /home/$USERNAME
USER $USERNAME
# setup ssh
RUN mkdir -p -m 0700 ~/.ssh
RUN ssh-keyscan github.com >> ~/.ssh/known_hosts
SHELL ["/bin/bash", "--login", "-c"]
# install nvm with a specified version of node
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash \
&& . ~/.nvm/nvm.sh \
&& nvm install --lts=iron \
&& npm install -g npm@11.6.2
# install npm updates
# RUN
# clone repo
RUN --mount=type=ssh,uid=1002 git clone git@github.com:MFB-Technologies-Inc/react-async-renderer /home/$USERNAME/workspace/react-async-renderer
# set working dir
WORKDIR /home/$USERNAME/workspace/react-async-renderer
VOLUME /home/$USERNAME/workspace/react-async-renderer