Add support for noetic in docker

This commit is contained in:
Leonid V. Fedorenchik 2023-01-12 18:52:34 +08:00
parent 54e922f783
commit ab6d0f2e01
2 changed files with 25 additions and 5 deletions

View file

@ -15,13 +15,14 @@ ENTRYPOINT ["/bin/bash", "-c"]
# Install build dependencies
RUN apt-get update && apt-get install -y curl
RUN curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
RUN PY_PKG_V=""; if [ "${ROS_DISTRO}" == "noetic" ]; then PY_PKG_V="3"; fi && \
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - && \
apt-get install -y \
sudo \
# ROS Build dependencies
python-rosinstall \
python-rosinstall-generator \
python-wstool \
python${PY_PKG_V}-rosinstall \
python${PY_PKG_V}-rosinstall-generator \
python${PY_PKG_V}-wstool \
build-essential \
python3-pip
@ -49,7 +50,7 @@ RUN rosdep install -r -y -i --from-paths .
USER er
# Build the project
WORKDIR /home/er/catkin_ws
RUN . /opt/ros/melodic/setup.bash && catkin_make
RUN catkin_make
# Let ROS know about the projects launch options
RUN echo "source /home/er/catkin_ws/devel/setup.bash" >> $BASH_ENV

View file

@ -32,3 +32,22 @@ services:
args:
<<: *common-args
BASE_IMAGE: ubuntu:18.04
nvidia-ros-noetic:
<<: *common
runtime: nvidia
build:
context: .
args:
<<: *common-args
ROS_DISTRO: "noetic"
BASE_IMAGE: nvidia/opengl:1.1-glvnd-runtime-ubuntu18.04
ros-noetic:
<<: *common
build:
context: .
args:
<<: *common-args
ROS_DISTRO: "noetic"
BASE_IMAGE: ubuntu:20.04