代码拉取完成,页面将自动刷新
ARG DOCKER_ROS_DISTRO=noetic
FROM ros:${DOCKER_ROS_DISTRO}
# Booststrap workspace.
ENV CATKIN_DIR=/catkin_ws
RUN . /opt/ros/$ROS_DISTRO/setup.sh \
&& mkdir -p $CATKIN_DIR/src \
&& cd $CATKIN_DIR/src \
&& catkin_init_workspace
WORKDIR $CATKIN_DIR
# Install dependencies first.
COPY rosbridge_suite/package.xml $CATKIN_DIR/src/rosbridge_suite/
COPY rosbridge_library/package.xml $CATKIN_DIR/src/rosbridge_library/
COPY rosbridge_server/package.xml $CATKIN_DIR/src/rosbridge_server/
COPY rosbridge_msgs/package.xml $CATKIN_DIR/src/rosbridge_msgs/
COPY rosapi/package.xml $CATKIN_DIR/src/rosapi/
RUN . /opt/ros/$ROS_DISTRO/setup.sh \
&& apt-get update \
&& rosdep update \
&& rosdep install \
--from-paths src \
--ignore-src \
--rosdistro $ROS_DISTRO \
-y \
&& rm -rf /var/lib/apt/lists/*
# Build rosbridge packages.
COPY rosbridge_suite $CATKIN_DIR/src/rosbridge_suite
COPY rosbridge_library $CATKIN_DIR/src/rosbridge_library
COPY rosbridge_server $CATKIN_DIR/src/rosbridge_server
COPY rosbridge_msgs $CATKIN_DIR/src/rosbridge_msgs
COPY rosapi $CATKIN_DIR/src/rosapi
RUN . /opt/ros/$ROS_DISTRO/setup.sh \
&& catkin_make
# We want the development workspace active all the time.
RUN echo "#!/bin/bash\n\
set -e\n\
source \"${CATKIN_DIR}/devel/setup.bash\"\n\
exec \"\$@\"" > /startup.sh \
&& chmod a+x /startup.sh \
&& echo "source ${CATKIN_DIR}/devel/setup.bash" >> /root/.bashrc
ENTRYPOINT ["/startup.sh"]
CMD ["bash"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。