-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
(cherry picked from commit caac9da) Co-authored-by: Henning Kayser <[email protected]>
- Loading branch information
1 parent
f467d56
commit c29de41
Showing
2 changed files
with
50 additions
and
7 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 |
---|---|---|
|
@@ -2,15 +2,59 @@ | |
# CI image using the ROS testing repository | ||
|
||
ARG ROS_DISTRO=rolling | ||
FROM ghcr.io/ros-planning/moveit2:${ROS_DISTRO}-ci | ||
FROM osrf/ros2:testing | ||
LABEL maintainer Robert Haschke [email protected] | ||
|
||
# Switch to ros-testing | ||
RUN echo "deb http://packages.ros.org/ros2-testing/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2-latest.list | ||
ENV TERM xterm | ||
|
||
# Upgrade packages to ros-shadow-fixed and clean apt-cache within one RUN command | ||
RUN apt-get -qq update && \ | ||
apt-get -qq upgrade && \ | ||
# Install ROS 2 base packages and build tools | ||
# We are installing ros-<distro>-ros-base here to mimic the behavior of the ros:<distro>-ros-base images. | ||
# This step is split into a separate layer so that we can rely on cached dependencies instead of having | ||
# to install them with every new build. The testing image and packages will only update every couple weeks. | ||
RUN \ | ||
# Update apt package list as previous containers clear the cache | ||
apt-get -q update && \ | ||
apt-get -q -y upgrade && \ | ||
# | ||
# Install base dependencies | ||
apt-get -q install --no-install-recommends -y \ | ||
# Some basic requirements | ||
wget git sudo curl \ | ||
# Preferred build tools | ||
clang clang-format-14 clang-tidy clang-tools \ | ||
ccache \ | ||
ros-"$ROS_DISTRO"-ros-base && \ | ||
# | ||
# Clear apt-cache to reduce image size | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Setup (temporary) ROS workspace | ||
WORKDIR /root/ws_moveit | ||
|
||
# Copy MoveIt sources from docker context | ||
COPY . src/moveit2 | ||
|
||
# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size | ||
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers | ||
RUN \ | ||
# Update apt package list as previous containers clear the cache | ||
apt-get -q update && \ | ||
apt-get -q -y upgrade && \ | ||
# | ||
# Globally disable git security | ||
# https://github.blog/2022-04-12-git-security-vulnerability-announced | ||
git config --global --add safe.directory "*" && \ | ||
# | ||
# Fetch all dependencies from moveit2.repos | ||
vcs import src < src/moveit2/moveit2.repos && \ | ||
if [ -r src/moveit2/moveit2_"$ROS_DISTRO".repos ] ; then vcs import src < src/moveit2/moveit2_"$ROS_DISTRO".repos ; fi && \ | ||
# | ||
# Download all dependencies of MoveIt | ||
rosdep update && \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
rosdep install -y --from-paths src --ignore-src --rosdistro "$ROS_DISTRO" --as-root=apt:false && \ | ||
# Remove the source code from this container | ||
rm -rf src && \ | ||
# | ||
# Clear apt-cache to reduce image size | ||
rm -rf /var/lib/apt/lists/* |
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 |
---|---|---|
|
@@ -98,7 +98,6 @@ jobs: | |
${{ env.DH_IMAGE }} | ||
ci-testing: | ||
needs: ci | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|