-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (26 loc) · 1 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
FROM ros:humble
ARG USERNAME=element
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN apt-get update && apt-get install -y \
ros-humble-ros-gz \
ros-humble-navigation2 \
ros-humble-tf-transformations \
ros-humble-robot-localization \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir transforms3d
# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
RUN mkdir -p /home/${USERNAME}/ros_ws/src
RUN chown -R element:element /home/${USERNAME}/ros_ws
# RUN git clone https://github.com/ecthelion99/element_robotics_task.git
COPY . /home/${USERNAME}/ros_ws/src/
ENV SHELL /bin/bash
# ********************************************************
# ********************************************************
USER $USERNAME
RUN /bin/bash -c '. /opt/ros/humble/setup.bash; cd /home/${USERNAME}/ros_ws; colcon build'
RUN echo "source /home/${USERNAME}/ros_ws/install/setup.bash" >> /home/${USERNAME}/.bashrc
CMD ["/bin/bash"]