# use the following line if you only have this dockerfile # RUN git clone https://github.com/HKUST-Aerial-Robotics/VINS-Mono.git # Build VINS-Mono WORKDIR $CATKIN_WS ENV TERM xterm ENV PYTHONIOENCODING UTF-8 RUN catkin config \ --extend /opt/ros/$ROS_DISTRO \ --cmake-args \ -DCMAKE_BUILD_TYPE=Release && \ catkin build && \ sed -i '/exec "$@"/i \ source "/root/catkin_ws/devel/setup.bash"' /ros_entrypoint.sh
然后运行如下命令构造镜像:
1
docker build -t ros:vins-mono .
3. 运行程序
基于前面构造的镜像,生成container:
1 2 3
docker run -it --name vins-mono \ --network host \ ros:vins-mono