-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
60 lines (48 loc) · 1.21 KB
/
Dockerfile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM ros:humble-ros-base
ENV DEBIAN_FRONTEND=noninteractive
ARG USERNAME=rr-user
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG NEOVIM_VERSION=v0.10.0
RUN apt-get update \
&& apt-get install -y \
clang \
clang-tidy \
clang-format \
cmake \
curl \
gdb \
git \
gettext \
ninja-build \
nodejs \
npm \
python3-pip \
python3-venv \
ripgrep \
unzip \
wget
RUN pip3 install \
black \
debugpy \
pynvim \
ruff
# Setup User
RUN groupadd --gid ${USER_GID} ${USERNAME} \
&& useradd -s /bin/bash --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME} \
&& apt-get install -y sudo \
&& echo ${USERNAME} ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/${USERNAME}\
&& chmod 0440 /etc/sudoers.d/${USERNAME} \
&& echo "source /usr/share/bash-completion/completions/git" >> /home/${USERNAME}/.bashrc
USER ${USERNAME}
WORKDIR /home/${USERNAME}
# Install neovim
COPY --chown=${USER_UID}:${USER_GID} . /home/${USERNAME}/ros2-with-neovim
RUN cd /home/${USERNAME}/ros2-with-neovim \
&& ./deploy.sh -v ${NEOVIM_VERSION}
RUN mkdir -p /home/${USERNAME}/ws/src
WORKDIR /home/${USERNAME}/ws
# Clean up apt cache
RUN sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*