I am creating a dockerfile for creating automatically an Ubuntu 16.04 operation system on which ROS kinetic is installed.
Until now, my the building process of the dockerfile yields to the installation of Ubuntu 16.04 as well as ROS kinetic.
RUN catkin_make command inside inside of the dockerfile is not working in the building process, even executing the command
RUN /bin/bash -c "bash /ros_entrypoint.sh" beforehand.
However, when I run the resulting docker image (
sudo docker run -it <its hash-number> ) and execute $
bash /ros_entrypoint.sh && cd ~/catkin_ws/ && catkin_make in the Ubuntu shell, the
catkin_make is working as you can see in the following image:
My goal is to achieve the same result with the building process of a dockerfile. I am out of ideas, how I could achieve this. Therefore I am asking for help.
I have already tried the answers of other questions, dealing with the almost same issue:
The current dockerfile, which needs to be improved, looks currently like this:
FROM ubuntu:16.04 FROM osrf/ros:kinetic-desktop-full #### HACK, replacing shell with bash for later docker build commands RUN mv /bin/sh /bin/sh-old && \ ln -s /bin/bash /bin/sh RUN /bin/bash -c "bash /ros_entrypoint.sh" RUN mkdir -p ~/catkin_ws/src/ RUN cd ~/catkin_ws/ && \ catkin_make
Post score: 3
Comment by jayess on 2019-01-12:
Please don't use an image to display text. Images are not searchable and people cannot copy and paste the text from the image. Please update your question with a copy and paste of the text.
Comment by Daniel_1337 on 2019-01-12:
@jayess: The picuture is not important. It just shows that the commands(bash /ros_entrypoint.sh && cd ~/catkin_ws/ && catkin_make) are working, when I run the dockerfile.
Comment by dj95 on 2020-04-28:
Hello, I'm a beginner trying to understand Docker. Could someone explain what does replacing shell with bash actually do?
#### HACK, replacing shell with bash for later docker build commands RUN mv /bin/sh /bin/sh-old && \ ln -s /bin/bash /bin/sh