-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (37 loc) · 1.29 KB
/
Dockerfile
File metadata and controls
40 lines (37 loc) · 1.29 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
FROM ros:iron-ros-base-jammy
ARG USERNAME=USERNAME
ARG USER_UID=1000
ARG USER_GID=$USER_UID
# Create the user
RUN groupadd --gid "$USER_GID" "$USERNAME" \
&& useradd --uid "$USER_UID" --gid "$USER_GID" -m "$USERNAME" \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
&& apt-get install -y sudo \
&& echo "$USERNAME" ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/"$USERNAME" \
&& chmod 0440 /etc/sudoers.d/"$USERNAME" \
&& apt-get clean
# Install dependencies
RUN apt update && apt upgrade -y \
&& apt install -y python3-pip \
&& apt install ros-"$ROS_DISTRO"-rviz2 -y \
&& apt install openssh-client -y \
&& apt install openssh-server -y \
&& apt install git -y \
&& apt install vim -y \
&& apt install python-is-python3 -y \
&& apt install clang-format -y \
&& apt install bear -y \
&& apt install curl -y \
&& curl -s https://deb.nodesource.com/setup_16.x | sudo bash \
&& apt install nodejs -y \
&& pip install black \
&& pip install rosbags \
&& pip install PyQT5 \
&& apt install ros-$ROS_DISTRO-xacro -y \
&& apt clean
RUN echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> /home/"$USERNAME"/.bashrc
ENV SHELL /bin/bash
USER $USERNAME
CMD ["/bin/bash"]