diff --git a/.github/workflows/humble-docker-build.yaml b/.github/workflows/humble-docker-build.yaml new file mode 100644 index 000000000..be2f12c47 --- /dev/null +++ b/.github/workflows/humble-docker-build.yaml @@ -0,0 +1,22 @@ +name: Build Humble Dockerfile +# description: builds the dockerfile contained within the repo + +on: + pull_request: + branches: + - humble + push: + branches: + - humble + schedule: + # Run every morning to detect broken dependencies + - cron: '40 1 * * *' + + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build the Docker image + run: docker build . --file Dockerfile/Dockerfile --tag ros2_control_demos_humble diff --git a/Dockerfile/Dockerfile b/Dockerfile/Dockerfile index 59ae934c4..74e982e71 100644 --- a/Dockerfile/Dockerfile +++ b/Dockerfile/Dockerfile @@ -5,13 +5,23 @@ FROM ros:${ROS_DISTRO}-ros-base ENV DEBIAN_FRONTEND noninteractive RUN apt-get update \ - && apt-get upgrade -y + && apt-get upgrade -y \ + && \ + : "remove cache" && \ + apt-get autoremove -y -qq && \ + rm -rf /var/lib/apt/lists/* COPY . /home/ros2_ws/src/ros2_control_demos RUN cd /home/ros2_ws/src \ - && rosdep update \ - && rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} --skip-keys rviz2 + && rosdep update --rosdistro ${ROS_DISTRO} \ + && apt-get update \ + && rosdep install --from-paths ./ -i -y --rosdistro ${ROS_DISTRO} \ + --skip-keys ros-${ROS_DISTRO}-joint-state-publisher-gui --skip-keys ros-${ROS_DISTRO}-rviz2\ + && \ + : "remove cache" && \ + apt-get autoremove -y -qq && \ + rm -rf /var/lib/apt/lists/* RUN cd /home/ros2_ws/ \ && . /opt/ros/${ROS_DISTRO}/setup.sh \