Skip to content

Commit

Permalink
fix ROS2 install on containers
Browse files Browse the repository at this point in the history
  • Loading branch information
TSC21 committed Jun 28, 2020
1 parent f795c9c commit d635bef
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ jobs:
- uses: actions/checkout@v1
- uses: julianoes/Publish-Docker-Github-Action@master
with:
name: px4io/px4-dev-ros-melodic
name: px4io/px4-dev-ros-noetic
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/Dockerfile_ros-noetic
Expand Down
6 changes: 0 additions & 6 deletions docker/Dockerfile_ros-kinetic
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,3 @@ RUN pip install argcomplete argparse catkin_pkg catkin-tools cerberus coverage \

# bootstrap rosdep
RUN rosdep init && rosdep update

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
6 changes: 0 additions & 6 deletions docker/Dockerfile_ros-melodic
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,3 @@ RUN pip install argcomplete argparse catkin_pkg catkin-tools cerberus coverage \

# bootstrap rosdep
RUN rosdep init && rosdep update

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
6 changes: 0 additions & 6 deletions docker/Dockerfile_ros-noetic
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,3 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6B

# bootstrap rosdep
RUN rosdep init && rosdep update

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
25 changes: 12 additions & 13 deletions docker/Dockerfile_ros2-ardent
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@ ENV ROS_DISTRO ardent
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -

# setup sources.list
RUN echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list \
&& apt-get update
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

# install ros2 desktop
RUN apt-get install -y --quiet \
libeigen3-dev \
# install bootstrap tools
RUN apt-get update \
&& apt-get install --quiet -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-vcstool \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# install ros2 desktop
RUN apt-get install --quiet --no-install-recommends -y \
libeigen3-dev \
ros-$ROS_DISTRO-desktop \
ros-$ROS_DISTRO-rosidl-generator-dds-idl \
&& apt-get -y autoremove \
Expand All @@ -30,8 +37,6 @@ RUN apt-get install -y --quiet \
# Install python 3 packages needed for testing
RUN pip3 install --upgrade \
argcomplete \
colcon-common-extensions \
colcon-mixin \
flake8 \
flake8-blind-except \
flake8-builtins \
Expand All @@ -52,9 +57,3 @@ RUN colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mix
&& colcon mixin update \
&& colcon metadata add default https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml \
&& colcon metadata update

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
23 changes: 11 additions & 12 deletions docker/Dockerfile_ros2-bouncy
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ ENV ROS_DISTRO bouncy
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -

# setup sources.list
RUN echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list \
&& apt-get update
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

# install ros2 desktop
RUN apt-get install -y --quiet \
# install bootstrap tools
RUN apt-get update \
&& apt-get install --quiet -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-vcstool \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# install ros2 desktop
RUN apt-get install --quiet --no-install-recommends -y \
ros-$ROS_DISTRO-desktop \
ros-$ROS_DISTRO-rosidl-generator-dds-idl \
&& apt-get -y autoremove \
Expand All @@ -29,8 +36,6 @@ RUN apt-get install -y --quiet \
# Install Python 3 packages needed for testing
RUN pip3 install --upgrade \
argcomplete \
colcon-common-extensions \
colcon-mixin \
flake8 \
flake8-blind-except \
flake8-builtins \
Expand Down Expand Up @@ -67,9 +72,3 @@ RUN git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git -b v1.0.4
&& gradle assemble \
&& gradle install \
&& rm -rf /tmp/*

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
23 changes: 11 additions & 12 deletions docker/Dockerfile_ros2-crystal
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ ENV ROS_DISTRO crystal
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -

# setup sources.list
RUN echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list \
&& apt-get update
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

# install ros2 desktop
RUN apt-get install -y --quiet \
# install bootstrap tools
RUN apt-get update \
&& apt-get install --quiet -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-vcstool \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# install ros2 desktop
RUN apt-get install --quiet --no-install-recommends -y \
ros-$ROS_DISTRO-desktop \
ros-$ROS_DISTRO-ros2bag \
ros-$ROS_DISTRO-rosidl-generator-dds-idl \
Expand All @@ -30,8 +37,6 @@ RUN apt-get install -y --quiet \
# Install Python 3 packages needed for testing
RUN pip3 install --upgrade \
argcomplete \
colcon-common-extensions \
colcon-mixin \
flake8 \
flake8-blind-except \
flake8-builtins \
Expand Down Expand Up @@ -61,9 +66,3 @@ RUN rm -rf /usr/local/include/fastrtps /usr/local/share/fastrtps /usr/local/lib/
&& cmake -DBUILD_JAVA=ON -DTHIRDPARTY=ON -DSECURITY=ON .. \
&& cmake --build . --target install -- -j $(nproc) \
&& rm -rf /tmp/*

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
23 changes: 11 additions & 12 deletions docker/Dockerfile_ros2-dashing
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ ENV ROS_DISTRO dashing
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -

# setup sources.list
RUN echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list \
&& apt-get update
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

# install ros2 desktop
RUN apt-get install -y --quiet \
# install bootstrap tools
RUN apt-get update \
&& apt-get install --quiet -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-vcstool \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# install ros2 desktop
RUN apt-get install --quiet --no-install-recommends -y \
ros-$ROS_DISTRO-desktop \
ros-$ROS_DISTRO-launch-testing-ament-cmake \
ros-$ROS_DISTRO-ros2bag \
Expand All @@ -31,8 +38,6 @@ RUN apt-get install -y --quiet \
# Install Python 3 packages needed for testing
RUN pip3 install --upgrade \
argcomplete \
colcon-common-extensions \
colcon-mixin \
flake8 \
flake8-blind-except \
flake8-builtins \
Expand All @@ -53,9 +58,3 @@ RUN colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mix
&& colcon mixin update \
&& colcon metadata add default https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml \
&& colcon metadata update

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
23 changes: 11 additions & 12 deletions docker/Dockerfile_ros2-eloquent
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ ENV ROS_DISTRO eloquent
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -

# setup sources.list
RUN echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list \
&& apt-get update
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

# install ros2 desktop
RUN apt-get install -y --quiet \
# install bootstrap tools
RUN apt-get update \
&& apt-get install --quiet -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-vcstool \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# install ros2 desktop
RUN apt-get install --quiet --no-install-recommends -y \
ros-$ROS_DISTRO-desktop \
ros-$ROS_DISTRO-launch-testing-ament-cmake \
ros-$ROS_DISTRO-ros2bag \
Expand All @@ -31,8 +38,6 @@ RUN apt-get install -y --quiet \
# Install Python 3 packages needed for testing
RUN pip3 install --upgrade \
argcomplete \
colcon-common-extensions \
colcon-mixin \
flake8 \
flake8-blind-except \
flake8-builtins \
Expand Down Expand Up @@ -70,9 +75,3 @@ RUN rm -rf /usr/local/include/fastrtps /usr/local/share/fastrtps /usr/local/lib/
&& cmake -DTHIRDPARTY=ON -DSECURITY=ON .. \
&& cmake --build . --target install -- -j $(nproc) \
&& rm -rf /tmp/*

# create and start as LOCAL_USER_ID
COPY scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

CMD ["/bin/bash"]
10 changes: 4 additions & 6 deletions docker/Dockerfile_ros2-foxy
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ ENV ROS_DISTRO foxy
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -

# setup sources.list
RUN echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list \
&& apt-get update
RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

# install bootstrap tools
RUN apt-get update && apt-get install --no-install-recommends -y \
git \
RUN apt-get update \
&& apt-get install --quiet -y \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-rosdep \
Expand All @@ -28,8 +27,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
&& rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*

# install ros2 desktop
RUN apt-get install -y --quiet \
python3-vcstool \
RUN apt-get install --quiet --no-install-recommends -y \
ros-$ROS_DISTRO-desktop \
ros-$ROS_DISTRO-launch-testing-ament-cmake \
ros-$ROS_DISTRO-ros2bag \
Expand Down

0 comments on commit d635bef

Please sign in to comment.