Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile for rolling #418

Merged
merged 5 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.circleci/
.github/
.gitignore/
LICENSE/
README.md
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ARG ROS_DISTRO=rolling
FROM ros:${ROS_DISTRO}-ros-core

WORKDIR /root/ros2_ws/

# Install essential dependencies
RUN apt-get update && \
apt-get install -y \
ros-dev-tools \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Clone dependencies
COPY tools/ros2_dependencies.repos .
RUN mkdir -p src && \
vcs import --input ros2_dependencies.repos src

# Initialize rosdep
RUN rosdep init

# Copy source code
COPY . src/grid_map

# Install dependencies
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
rosdep update && \
source /opt/ros/${ROS_DISTRO}/setup.bash && \
rosdep install -y --ignore-src --from-paths src --skip-keys slam_toolbox --skip-keys gazebo_ros_pkgs --skip-keys turtlebot3_gazebo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Build
RUN source /opt/ros/${ROS_DISTRO}/setup.bash && \
colcon build --symlink-install --packages-up-to grid_map