-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 1017 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Base docker image.
ARG ROS_DISTRO
FROM osrf/ros:${ROS_DISTRO}-desktop
# Update system
RUN apt update
RUN apt upgrade -y
RUN rosdep update
# Install mavsim dependencies not avaliable through rosdep
RUN apt install python3-pip -y
RUN pip3 install pyopengl
# Clone ROSflight repo
WORKDIR /rosflight_ws/src
RUN git clone --recursive https://github.com/rosflight/rosflight_ros_pkgs.git
# Copy over local repo and run setup
COPY . mavsim_rosflight_bridge
WORKDIR /rosflight_ws/src/mavsim_rosflight_bridge
RUN ./setup_mavsim.sh
# Install ROS dependencies with rosdep dependencies and build packages
WORKDIR /rosflight_ws
RUN rosdep install --from-paths . --ignore-src -y
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash && colcon build"
# Add source files to .bashrc for automatic sourcing
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /root/.bashrc
RUN echo "source /rosflight_ws/install/setup.bash" >> /root/.bashrc
RUN echo "source /usr/share/gazebo/setup.sh" >> /root/.bashrc
ENTRYPOINT bash