docker rosdep install not working from Dockerfile
I am trying to build a container with some custom packages to run gazebo to avoid installing a new version of ubuntu (I have 16.04 and need melodic which runs on 18.04). My Dockerfile is:
FROM ros:melodic
RUN apt-get update && \
apt-get install -y ros-melodic-gazebo-ros-pkgs
WORKDIR /home/catkin_ws
ADD src/ /home/catkin_ws/src
RUN rosdep install --from-paths /home/catkin_ws/src/
RUN catkin_make
The issue is that rosdep install
throws the following error:
Do you want to continue? [Y/n] Abort.
ERROR: the following rosdeps failed to install
apt: command [apt-get install ros-melodic-moveit-planners-ompl] failed
executing command [apt-get install ros-melodic-moveit-planners-ompl]
The command '/bin/sh -c rosdep install --from-paths /home/catkin_ws/src/' returned a non-zero code: 1
However, if I comment the last two lines in the Dockerfile, run the container (with bash) and execute them, they work. What do I have to modify so they are execute while building the container?
Thanks for the help.