Skip to content

Commit

Permalink
Touchup Dockerfile and create a workflow building it (backport #323) (#…
Browse files Browse the repository at this point in the history
…324)


Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Christoph Froehlich <christoph.froehlich@ait.ac.at>
  • Loading branch information
3 people authored Jun 29, 2023
1 parent ba54f20 commit ae0a7d3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/humble-docker-build.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 13 additions & 3 deletions Dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit ae0a7d3

Please sign in to comment.