Skip to content

Commit 7578f66

Browse files
authored
Merge pull request #418 from Ryanf55/add-dockerfile
Add dockerfile for rolling
2 parents 7dc0a8c + f13b648 commit 7578f66

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.circleci/
2+
.github/
3+
.gitignore/
4+
LICENSE/
5+
README.md

Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
ARG ROS_DISTRO=rolling
2+
FROM ros:${ROS_DISTRO}-ros-core
3+
4+
WORKDIR /root/ros2_ws/
5+
6+
# Install essential dependencies
7+
RUN apt-get update && \
8+
apt-get install -y \
9+
ros-dev-tools \
10+
wget && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
13+
14+
# Clone dependencies
15+
COPY tools/ros2_dependencies.repos .
16+
RUN mkdir -p src && \
17+
vcs import --input ros2_dependencies.repos src
18+
19+
# Initialize rosdep
20+
RUN rosdep init
21+
22+
# Copy source code
23+
COPY . src/grid_map
24+
25+
# Install dependencies
26+
SHELL ["/bin/bash", "-c"]
27+
RUN apt-get update && \
28+
rosdep update && \
29+
source /opt/ros/${ROS_DISTRO}/setup.bash && \
30+
rosdep install -y --ignore-src --from-paths src --skip-keys slam_toolbox --skip-keys gazebo_ros_pkgs --skip-keys turtlebot3_gazebo && \
31+
apt-get clean && \
32+
rm -rf /var/lib/apt/lists/*
33+
34+
# Build
35+
RUN source /opt/ros/${ROS_DISTRO}/setup.bash && \
36+
colcon build --symlink-install --packages-up-to grid_map

0 commit comments

Comments
 (0)