forked from osrf/vehicle_gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
93 lines (64 loc) · 2.82 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# docker build -t flying_robots -f docker/dev/Dockerfile .
FROM ros:humble-ros-core-jammy
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
git \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-rosdep \
python3-vcstool \
python3-pip \
python3-kconfiglib \
python3-jinja2 \
python3-jsonschema \
python3-future \
gcc-arm-none-eabi \
rsync \
dirmngr \
build-essential \
lsb-release \
wget \
curl \
gnupg2 \
qtbase5-dev \
cmake \
ros-humble-rqt-* \
ros-humble-rqt-common-plugins \
ros-humble-teleop-* \
&& rm -rf /var/lib/apt/lists/*
RUN rosdep init && \
rosdep update --rosdistro $ROS_DISTRO
RUN colcon mixin add default \
https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml && \
colcon mixin update && \
colcon metadata add default \
https://raw.githubusercontent.com/colcon/colcon-metadata-repository/master/index.yaml && \
colcon metadata update
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-humble-ros-base=0.10.0-1* \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install vcstool pyros-genmsg mavsdk aioconsole pygame
COPY . /home/vehicle_gateway/src/vehicle_gateway
# RUN mkdir -p /home/vehicle_gateway/src && cd /home/vehicle_gateway && git clone https://github.com/PequiM-FlyingRobots/vehicle_gateway.git src/vehicle_gateway --depth 1 && \
# vcs import src < src/vehicle_gateway/dependencies.repos
RUN cd /home/vehicle_gateway && \
vcs import src < src/vehicle_gateway/dependencies.repos
RUN wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null && \
apt-get update && \
apt-get install -y -qq gz-garden \
&& apt-get clean
RUN cd /home/vehicle_gateway && \
rosdep update && rosdep install --from-paths ./ -i -y --rosdistro humble --ignore-src --skip-keys="gz-transport12 gz-common5 gz-math7 gz-msgs9 gz-gui7 gz-cmake3 gz-sim7 zenohc gz-transport7 gz-plugin2"
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
WORKDIR /home/vehicle_gateway
RUN echo "export PATH=$HOME/.cargo/bin:$PATH" >> ~/.bashrc
ENV PATH="/root/.cargo/bin:${PATH}"
RUN echo ". $HOME/.cargo/env"
RUN /bin/bash -c "source /opt/ros/humble/setup.bash; colcon build --merge-install --event-handlers console_direct+ --cmake-args -DBUILD_TESTING=0"
RUN apt-get install -y -q ros-humble-ros2launch
RUN echo ""
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["bash"]