From ddaf48f2de3c1171438c32985bf4539c69486541 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sun, 29 Oct 2023 10:33:32 +0100 Subject: [PATCH] ici Dockerfile --- .github/workflows/Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/Dockerfile diff --git a/.github/workflows/Dockerfile b/.github/workflows/Dockerfile new file mode 100644 index 000000000..e9d3fd62c --- /dev/null +++ b/.github/workflows/Dockerfile @@ -0,0 +1,35 @@ +# rhaschke/ici:rviz-noetic-ros +# Image used for GHA CI builds +# build with: DOCKER_BUILDKIT=1 docker build --tag rhaschke/ici:rviz-noetic-ros - < .github/workflows/Dockerfile + +ARG ROS_DISTRO=noetic +FROM ros:${ROS_DISTRO}-ros-base + +ENV TERM xterm + +# 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 --mount=type=bind,target=/tmp/rviz \ + # Update apt package list as previous containers clear the cache + apt-get -q update && \ + apt-get -q -y dist-upgrade && \ + # + # Install some base dependencies + apt-get -q install --no-install-recommends -y \ + # Some basic requirements + wget git sudo \ + # Preferred build tools + python$(test "${ROS_DISTRO}" = "noetic" && echo 3)-catkin-tools \ + clang clang-format-10 clang-tidy clang-tools \ + ccache && \ + # + # Download all dependencies of MoveIt + rosdep update $(test "${ROS_DISTRO}" = "melodic" && echo "--include-eol-distros") && \ + DEBIAN_FRONTEND=noninteractive \ + rosdep install -y --from-paths /tmp/rviz --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \ + # + # Clear apt-cache to reduce image size + rm -rf /var/lib/apt/lists/* && \ + # Globally disable git security + # https://github.blog/2022-04-12-git-security-vulnerability-announced + git config --global --add safe.directory "*"