InteractiveRobotLearning/Dockerfile

27 lines
607 B
Docker
Raw Normal View History

2024-02-14 11:16:31 +00:00
# Use ROS 2 Humble Hawksbill base image
2024-02-15 11:04:54 +00:00
FROM osrf/ros:humble-desktop-full-jammy
2024-02-14 11:16:31 +00:00
# Update and install dependencies
RUN apt-get update && apt-get install -y \
2024-02-15 11:04:54 +00:00
python3-colcon-common-extensions python3-pip \
2024-02-14 11:16:31 +00:00
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Create a workspace
WORKDIR /ros2_ws
# Copy your ROS 2 package into the workspace
2024-02-15 11:04:54 +00:00
COPY ./src /ros2_ws/src
2024-02-14 11:16:31 +00:00
# Build your package
RUN . /opt/ros/humble/setup.sh && \
colcon build
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
# Source the workspace
CMD ["/bin/bash"]