forked from nimrossum/marvin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (43 loc) · 1.31 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
FROM osrf/ros:noetic-desktop-full
#Installing nano and nvim
RUN apt-get update \
&& apt-get install -y \
nano \
tmux \
python3-catkin-tools \
ros-noetic-hector-gazebo-plugins \
ros-noetic-ros-controllers \
ros-noetic-gazebo-ros-control \
ros-noetic-navigation \
ros-noetic-joy \
ros-noetic-teleop-twist-keyboard \
ros-noetic-amcl \
ros-noetic-neo-local-planner \
ros-noetic-map-server \
ros-noetic-move-base \
ros-noetic-openslam-gmapping \
libgl1-mesa-glx \
libgl1-mesa-dri \
git \
liburdfdom-tools \
&& rm -rf /var/lib/apt/lists/*
ARG USERNAME=ros
ARG USER_UID=1000
ARG USER_GID=$USER_UID
#Created files won't have sudo privileges
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
&& mkdir -p /home/$USERNAME/.config \
&& chown -R $USER_UID:$USER_GID /home/$USERNAME
#Setting up sudo
RUN apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p home/$USERNAME/catkin_ws/src
COPY config/bashrc /.bashrc
COPY config/docker_tmux /home/$USERNAME/.tmux.conf
# Initialises the catkin workspace
RUN /bin/bash -c 'source ./opt/ros/noetic/setup.bash; cd /home/${USERNAME}/catkin_ws; catkin init; catkin build'
USER $USERNAME
CMD ["bash"]