You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
886 B
23 lines
886 B
1 month ago
|
# Используем официальный образ ROS 2 Humble
|
||
|
FROM osrf/ros:humble-desktop
|
||
|
|
||
|
# Установка необходимых инструментов
|
||
|
RUN apt-get update && apt-get install -y \
|
||
|
python3-colcon-common-extensions \
|
||
|
python3-pip \
|
||
|
&& apt-get clean
|
||
|
|
||
|
# Создание рабочей директории
|
||
|
WORKDIR /ros2_ws
|
||
|
|
||
|
# Копируем рабочее пространство в контейнер
|
||
|
COPY ros2_ws /ros2_ws
|
||
|
|
||
|
# Устанавливаем зависимости Python
|
||
|
RUN pip3 install -r /ros2_ws/src/my_python_pkg/requirements.txt
|
||
|
|
||
|
# Сборка рабочего пространства
|
||
|
RUN /bin/bash -c "source /opt/ros/humble/setup.bash && colcon build"
|
||
|
|
||
|
# Настройка контейнера для запуска ROS 2
|
||
|
CMD ["/bin/bash", "-c", "source /opt/ros/humble/setup.bash && source install/setup.bash && bash"]
|