-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #418 from Ryanf55/add-dockerfile
Add dockerfile for rolling
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.circleci/ | ||
.github/ | ||
.gitignore/ | ||
LICENSE/ | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |